remove constant warning in base62 file
This commit is contained in:
parent
f674b9e86e
commit
24dcfc2db5
|
@ -1,9 +1,9 @@
|
|||
# Modified version of: https://github.com/steventen/base62-rb
|
||||
|
||||
module Base62
|
||||
KEYS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".freeze
|
||||
KEYS_HASH = KEYS.each_char.with_index.inject({}) { |h, (k, v)| h[k] = v; h }
|
||||
BASE = KEYS.length
|
||||
KEYS ||= "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".freeze
|
||||
KEYS_HASH ||= KEYS.each_char.with_index.to_h
|
||||
BASE ||= KEYS.length
|
||||
|
||||
# Encodes base10 (decimal) number to base62 string.
|
||||
def self.encode(num)
|
||||
|
|
Loading…
Reference in New Issue