lib/monetize/parser.rb in monetize-1.9.0 vs lib/monetize/parser.rb in monetize-1.9.1
- old
+ new
@@ -150,10 +150,10 @@
CURRENCY_SYMBOLS.keys.map { |key| Regexp.escape(key) }.join('|')
end
def set_minor_precision(minor, currency)
if Money.infinite_precision
- (BigDecimal.new(minor) / (10**minor.size)) * currency.subunit_to_unit
+ (BigDecimal(minor) / (10**minor.size)) * currency.subunit_to_unit
elsif minor.size < currency.decimal_places
(minor + ('0' * currency.decimal_places))[0, currency.decimal_places].to_i
elsif minor.size > currency.decimal_places
if minor[currency.decimal_places, 1].to_i >= 5
minor[0, currency.decimal_places].to_i + 1