Shopify/money

Parsing is incorrect if there are more than two numbers after the decimal point

davidcornu opened this issue · 1 comments

Shopify/money

irb(main):001:0> require 'money'
=> true
irb(main):002:0> "1.11111111".to_money
=> #<Money value:111111111.00>
irb(main):003:0> "1.11111111".to_money.to_f
=> 111111111.0

RubyMoney/monetize (https://github.com/RubyMoney/monetize)

irb(main):001:0> require 'monetize'
=> true
irb(main):002:0> "1.11111111".to_money
=> #<Money fractional:111 currency:USD>
irb(main):003:0> "1.11111111".to_money.to_f
=> 1.11

Discovered by @byroot

it can't really be correct either way without #2 ?