ClosestSum 1.2.0-universal-linux → 1.3.0-universal-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ClosestSum.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33a39caa85808f514d62032b497e420682075875
|
4
|
+
data.tar.gz: 24ee60ae5373edd88f037b2e4cd18f60ce92bef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f7fcdd8d26e5036bfc37647bd26955d313cad8482f1d9f7428fca0074908f417c3d6ad71cfed521e131e9a5213004f5ceed2ba208202d4b4ebda1d4d3022d29
|
7
|
+
data.tar.gz: 05b0900e83e205dd4dd7a245044b089427a36986c367388e65a77db30d04a3e7f17c2cdcf05d0b2dc11822812281fbcb6c41b8301bd701a76b1ce02c2a8afdbf
|
data/lib/ClosestSum.rb
CHANGED
@@ -31,7 +31,7 @@ module ClosestSum
|
|
31
31
|
def ClosestSum.validate (inputHash)
|
32
32
|
inputHash.each {
|
33
33
|
|x, y|
|
34
|
-
raise TypeError.new 'non-numeric value detected' if ((y.class.to_s == 'Fixnum') or (y.class.to_s == 'Float') or (y.class.to_s == 'Numeric') or (y.class.to_s == 'Integer'))
|
34
|
+
raise TypeError.new 'non-numeric value detected' if ((y.class.to_s == 'Fixnum') or (y.class.to_s == 'Float') or (y.class.to_s == 'Numeric') or (y.class.to_s == 'Integer') or (y.class.to_s == :Fixnum) or (y.class.to_s == :Float) or (y.class.to_s == :Numeric) or (y.class.to_s == :Integer))
|
35
35
|
}
|
36
36
|
end
|
37
37
|
def ClosestSum.calculate (targetSize, inputHash)
|