shortuuid 0.4.0 → 0.5.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e301bebd9f1f14532b00b2c8103451a423d1d7d
4
- data.tar.gz: ff2c4df14dce722dc3bb3b05b2c97f1cb668c4ba
3
+ metadata.gz: c5b102b6f8fd80fbd6e8d2d781ade1061c1bc129
4
+ data.tar.gz: 68a2030a24eca5c2d5dd97cc8e1ad2d58e6fa759
5
5
  SHA512:
6
- metadata.gz: 4d37976f65434d780ce680d84fc8ccd025370591a2e39a09b48678640b07c079a7383ca102f020fa95659de801520cee151a7937b0217aa6e858dbd7db757a5a
7
- data.tar.gz: 79a5c5fcc2a2d6dc712ea144521b70dccfa2fc5aa18f9dcc24882dc04175d408029d3a0a9b7ba1bffd7bfae1113608bd8b19605c30e580d54215e4301adc1fdc
6
+ metadata.gz: 0b08481115bc685e1aa4fe2216e5888ebe0449f121b0472636b849da8facc1f22d4192a751f140c813de2b34e6d35c839671078d43dbc719fec87a5d50b9a106
7
+ data.tar.gz: d1eaa1cc544c23b27915104443101a2093c13a3712755814047d6af9414637b124e66059f5d9c0538001397d8dc3079bd2dfac34466f54e1f78314ab612395ed
data/lib/shortuuid.rb CHANGED
@@ -25,7 +25,7 @@ module ShortUUID
25
25
  def self.convert_alphabet_to_decimal(word, alphabet)
26
26
  num = 0
27
27
  radix = alphabet.length
28
- word.chars.reverse.each_with_index do |char, index|
28
+ word.chars.to_a.reverse.each_with_index do |char, index|
29
29
  num += alphabet.index(char) * (radix**index)
30
30
  end
31
31
  num
@@ -1,3 +1,3 @@
1
1
  module ShortUUID
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.5.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shortuuid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sudhir Jonathan