jgrep 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- 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
|