to_histogram 1.0.16 → 1.0.17

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 +3 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9f9630dbdff3b9465ee3696e6d5a8d73d3a5e5e
4
- data.tar.gz: 3121fc6706557f2c124357c44909ff87756caec6
3
+ metadata.gz: 88a165ff8fb7ec704bceca532ce7e55042385d4c
4
+ data.tar.gz: c095f32ec744f8a4b2fec879cab8bb9015410210
5
5
  SHA512:
6
- metadata.gz: 2bb9704b379519eb81d97954179bd2d730d8a021a0238ef3b1546f252513570c66875f0d34ede5d2bc45c1d0892c671021fd78c09c0027bd013147cdf5e34b7c
7
- data.tar.gz: 0928606f6d502f7dc9f6bced7d56bce330a29203c443aaed0ba7e9b782279b90acc420b9c43fb631ab71b4b1c55e38a1fc444f4e7829d9c284b5dba82ff111dd
6
+ metadata.gz: aec985b4a5b08c3b4237b19dbf1a5872b6b392bb0d582a91de618152fb2a991326c19624336a5cdd4a456818b97a08b820d08c6522e2c04aebea9229b50594af
7
+ data.tar.gz: 2adb6382f68cbf4fba8f26a2f2d40ec790aa7858b8c07ab3c8f7773697630e89b988a03e1f9c4daeefb1dc71246ed9abd1a5970c9e1b510f56146a16c11323dc
data/lib/bucketizer.rb CHANGED
@@ -67,6 +67,9 @@ module ToHistogram
67
67
 
68
68
  private
69
69
  def prepare_data(data)
70
+ data.delete(nil)
71
+ data.delete("")
72
+
70
73
  if(data.any? { |e| e.is_a? String })
71
74
  return (data.map { |e| e.to_i }).sort
72
75
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_histogram
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.16
4
+ version: 1.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Sykes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-17 00:00:00.000000000 Z
11
+ date: 2015-12-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Adds #to_histogram to Array. Returns a histogram distribution object
14
14
  from an Array and optionally prints detailed info to stdout.'