to_histogram 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bucketizer.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 162e10ea64eef54086423d4d614eb4773504cbc3
4
- data.tar.gz: a9af663142333bf284fcf931f368d56b915a321c
3
+ metadata.gz: bba2aa3dfca1bb5992786030deadd4ffc569b483
4
+ data.tar.gz: 58b857484458ca438a0548db2f6f945a6c0f99ee
5
5
  SHA512:
6
- metadata.gz: 989f868d25eca22f80a09992d67a193009343c204ca7ab37562848e3f2cef9eccd77302ed6a8ae6a250085d7a9dcb6f9b78ab7b3711933d2c78dcb7921678892
7
- data.tar.gz: bc4232aaf2d2bd80259133c102de38bb30d4fc7ced0437eda25e75976ad6270c5b2029c9d89b5e95ada640bc0bb8952f21a27ba6aeb07a6882a308e6054e26d3
6
+ metadata.gz: 87163c0f3ea544d88f63d7313b5dbf21dc64544e6fff56ff46c7e777e7f8fdac0af84fc89a70dbd4317f259e4006c686fa9ba5b14ec1594d037d94384c33799f
7
+ data.tar.gz: 9a6a995528dc649652839f8399d54f2687abcfef78d1d3325e9c3a698ca94bacaf471f08beb1d228a87f59a982bafb0eca1888b36a70276d30a6b517159af01e
data/lib/bucketizer.rb CHANGED
@@ -15,7 +15,7 @@ module ToHistogram
15
15
 
16
16
  # Special case where all of the results fit into the first bucket
17
17
  if buckets[0].length == arr.length
18
- l_index = (arr.length - 1)
18
+ l_index = (arr.length)
19
19
  break
20
20
  end
21
21
 
@@ -24,7 +24,7 @@ module ToHistogram
24
24
  end
25
25
  end
26
26
 
27
- if(l_index != (arr.length - 1))
27
+ if(l_index <= (arr.length - 1))
28
28
  buckets << arr[l_index..(arr.length - 1)]
29
29
  end
30
30
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_histogram
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Sykes