ClosestSum 1.1.0-universal-linux → 1.2.0-universal-linux

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ClosestSum.rb +1 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d682f216b3324060a57b1dbce50d994077a83052
4
- data.tar.gz: 757ccf8a8c79ab64256b8a5418e5ae0620918da1
3
+ metadata.gz: 9b6646b21eabf6699f6ad0e1bc06a14c6421ce76
4
+ data.tar.gz: ba9081c8c5f13d18598b935420436e9f4300cae1
5
5
  SHA512:
6
- metadata.gz: f7e681c0475b06520415617ec1a02b009228ac55e9c7bbb8df8c38cac4fd4e90543e9ccc72f8c5d58ec97b0ea4682c445d9f274e8d6596675ee0f220ab8eddf4
7
- data.tar.gz: b77e8f9a111f61433f8433a333ad4eea1c349119143e27f01f27e30e22076dd0c2dffaecb8b092b6a88d0b9f4adae5bea20046d2e75d04af805fe42756a58b8b
6
+ metadata.gz: a25bfe2448af2eeb30be93eaca6351021e1e9b7c5dc987acda107a614aa99b0c5ecc1e4f0e82976f2fbb54e2d08f5cba73619db0c0f3d858d88178d3fa9c6e10
7
+ data.tar.gz: 49cc507025f70fa94993e525c26c8a3cb47b72b5bb8e40a4a74d7c6f406e97a0ae277b5c8467c1ef985c3336b72cb45849e3f87ca17a3de9ba53628d86ae8a6b
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'
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'))
35
35
  }
36
36
  end
37
37
  def ClosestSum.calculate (targetSize, inputHash)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ClosestSum
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: universal-linux
6
6
  authors:
7
7
  - dE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-04 00:00:00.000000000 Z
11
+ date: 2019-02-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Given a hash of keys and numeric values and another integer value (target
14
14
  size), this module will select the largest keys from the given hash such that the