-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise warning on using default Money.rounding_mode #883
Raise warning on using default Money.rounding_mode #883
Conversation
@antstorm - just curious, why change the default |
@wholien the default rounding mode is |
This is the current default value, but it will change in the Money gem in some future release (v7). People can start adhering to that value by setting Money.rounding_mode = BigDecimal::ROUND_HALF_UP in their own application. For now, this is what we used so far and we should not change it for existing applications. Ref: RubyMoney/money#883
@antstorm appreciate the explanation. |
Currency: from USD to nil Rounding: from ROUND_HALF_EVEN to ROUND_HALF_UP The warnings were added in RubyMoney#882 and RubyMoney#883 and refined in RubyMoney#902.
This is the current default value, but it will change in the Money gem in some future release (v7). People can start adhering to that value by setting Money.rounding_mode = BigDecimal::ROUND_HALF_UP in their own application. For now, this is what we used so far and we should not change it for existing applications. Ref: RubyMoney/money#883
The default
Money.rounding_mode
will change toROUND_HALF_UP
in v7. Warning everyone ahead of time to minimise potential impact