Issue #12958 has been updated by Chris Cerami.


I would echo 100% of what mathew murphy wrote, and also add that this negatively affects ergonomics for the vast majority of cases where one wants to not use banker's rounding. I now need to know that Ruby rounds Floats differently than almost every other context, and then need to use

```ruby
f.round(half: :up)
```

to get the expected behavior rather than simply `f.round`. It makes far more sense to make banker's rounding require the args and maintain backwards compatibility with the default behavior.

Not to mention the fact that this is a breaking change introduced in a minor version.

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

* 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>