Issue #12958 has been updated by Martin Dürst.


Shyouhei Urabe wrote:

> The new default is called the "banker's round" for reasons.  Money related people should prefer this.

We don't know to what extent such an argument applies around the world.

> And to say frankly, using Floats for money-related calculation is the source of weirdness.

Definitely. But while we can tell everybody to use BigDecimal, we don't know how many people are using Float, and maybe use some special tricks to make sure they get the rounding they need (which may be confused by our planned changes).

And money is one of the areas (another is security) where any kind of unexpected changes are a bad thing.

----------------------------------------
Bug #12958: Breaking change in how `#round` works
https://bugs.ruby-lang.org/issues/12958#change-61804

* Author: Rafael França
* Status: Assigned
* Priority: Normal
* Assignee: Kenta Murata
* ruby -v: 
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
We noticed in the Rails test suite that there is a breaking change in how `#round` works between 2.3 and 2.4

https://github.com/rails/rails/pull/27091

Is that desirable?

I think it is may cause a lot of problem if the behavior of `#round` without any arguments changes between a minor version.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>