lib/base58.rb in base58-0.0.3 vs lib/base58.rb in base58-0.0.4

- old
+ new

@@ -17,9 +17,10 @@ int_val end # Converts a base10 integer to a base58 string. def self.int_to_base58(int_val) + raise ArgumentError, 'Value passed is not an Integer.' unless int_val.is_a?(Integer) base58_val = '' while(int_val >= BASE) mod = int_val % BASE base58_val = ALPHABET[mod,1] + base58_val int_val = (int_val - mod)/BASE