Issue #12958 has been updated by Shyouhei Urabe.


Jerome Cornet wrote:
> But does this mean that Float rounds in a different way as BigDecimal by default then ?
> So the patch made Float rounding consistent with sprintf rouding, but by doing so it made default Float rounding inconsistent with default BigDecimal rounding. 
> Is my understanding correct ?

Correct.  It is true that we fixed one inconsistency to introduce another.  This might perhaps be a problem.  Not sure how big the problem would be though.

There is no BigDecimal-versus-sprintf problem because you cannot pass a BigDecimal to sprintf.  So I believe the disturbance (if any) would be faint.  But yes, I admit I might be wrong here.

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

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