jgrep 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/jgrep.gemspec +1 -1
- data/lib/jgrep.rb +2 -2
- metadata +2 -2
data/jgrep.gemspec
CHANGED
data/lib/jgrep.rb
CHANGED
@@ -29,9 +29,9 @@ module JGrep
|
|
29
29
|
|
30
30
|
#Correctly format values so we can do the correct type of comparison
|
31
31
|
def self.format(kvalue, value)
|
32
|
-
if kvalue =~ /^\d+$/
|
32
|
+
if kvalue =~ /^\d+$/ && value =~ /^\d+$/
|
33
33
|
return Integer(kvalue), Integer(value)
|
34
|
-
elsif kvalue =~ /^\d+.\d+$/
|
34
|
+
elsif kvalue =~ /^\d+.\d+$/ && value =~ /^\d+.\d+$/
|
35
35
|
return Float(kvalue), Float(value)
|
36
36
|
else
|
37
37
|
return kvalue, value
|