Require round-to-nearest-even behavior for Ruby 2.4+ #322

Merged
merged 2 commits into from Nov 5, 2016

Projects

None yet

3 participants

@noahgibbs
Contributor

But require round-to-nearest before that.

@noahgibbs noahgibbs Require round-to-nearest-even behavior for Ruby 2.4+, but round-to-ne…
…arest before that.
818e431
+ +2.5e20.round(-20).should eql( +3 * 10 ** 20 )
+ -2.5e20.round(-20).should eql( -3 * 10 ** 20 )
+ end
+ end
@eregon
eregon Oct 20, 2016 Member

Could you swap these two ìt` so the 2.4 behavior comes after the < 2.4 behavior?

@noahgibbs
noahgibbs Oct 20, 2016 Contributor

Absolutely. Pushed.

@noahgibbs noahgibbs Swap code to put pre-2.4 behavior before 2.4 behavior.
f9cd9dd
@eregon
Member
eregon commented Oct 20, 2016

It looks great, thanks for adapting the specs!
As soon as the change is in MRI we can merge this 😃

@nobu nobu merged commit 5eb8b40 into ruby:master Nov 5, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment