Skip to content

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

Merged
nobu merged 2 commits into
ruby:masterfrom
noahgibbs:round-even
Nov 5, 2016
Merged

Require round-to-nearest-even behavior for Ruby 2.4+#322
nobu merged 2 commits into
ruby:masterfrom
noahgibbs:round-even

Conversation

@noahgibbs

Copy link
Copy Markdown

But require round-to-nearest before that.

Comment thread core/float/round_spec.rb
+2.5e20.round(-20).should eql( +3 * 10 ** 20 )
-2.5e20.round(-20).should eql( -3 * 10 ** 20 )
end
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely. Pushed.

@eregon

eregon commented Oct 20, 2016

Copy link
Copy Markdown
Member

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
@ghost ghost deleted a comment Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants