[ruby-core:78207] Re: [Ruby trunk Bug#12958] Breaking change in how `#round` works

From: Eustáquio Rangel <eustaquiorangel@...>
Date: 2016-11-18 23:14:44 UTC
List: ruby-core #78207
So we'll have the following behaviors:

11.5.round
 =3D> 12
11.5.round(half: :even)
 =3D> 12
11.5.round(half: :up)
 =3D> 12

12.5.round
 =3D> 12
12.5.round(half: :even)
 =3D> 12
12.5.round(half: :up)
 =3D> 13

=E2=80=8BOn 2.3.1 if the last number is 5 it always goes up, right?

Regards,=E2=80=8B

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

In This Thread

Prev Next