RubyMoney / monetize

A library for converting various objects into `Money` objects.
MIT License
430 stars 107 forks source link

[v1.9.1] Monetize.parse does not take into account rounding mode #125

Closed flvrone closed 5 years ago

flvrone commented 5 years ago

Here's an example with Banker's Rounding mode:

Money.from_amount(1.545, :usd)
# => #<Money fractional:154 currency:USD>

Monetize.parse!('1.545 USD')
# => #<Money fractional:155 currency:USD>

Perhaps it's already fixed on master.

antstorm commented 5 years ago

Yes, here's the commit — https://github.com/RubyMoney/monetize/commit/e5700edbd353c3f9668db377b1c75d16de4216db

I'll release v1.9.2 — https://rubygems.org/gems/monetize