Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Truffle] Upgraded from Rubinius 2.5.6 to 2.7. #3561

Merged
merged 1 commit into from
Dec 23, 2015

Conversation

nirvdrum
Copy link
Contributor

This is a fairly straightforward upgrade from Rubinius 2.5.6 to 2.7. I copied over code formatting changes made upstream to avoid future diffs the next time we sync. There was some additional whitespace that looks odd, but it's what upstream has.

@chrisseaton @pitr-ch @eregon - Please give a look over at your leisure.

@nirvdrum
Copy link
Contributor Author

I think the biggest things of note are:

  • Float.negative? -> Float.signbit? -- needed for Ruby 2.3 compatibility
  • The removal of API shims we managed to get merged upstream

@eregon
Copy link
Member

eregon commented Dec 23, 2015

Seems quite straightforward, looks good.

class Time

def to_f
seconds + nsec * 0.000000001 # Truffle: optimized
Copy link
Contributor

Choose a reason for hiding this comment

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

'optimized'? What is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know. I just carried it forward. Someone had modified the Rubinius file in place. All I did was move the modification out to a shim file like we've done elsewhere.

Edit: It looks like @eregon originally made the change in 7e88d72.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think #to_f was using rational, which went off into the weeds doing some crazy stuff.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah it's optimized to avoid going down a crazy path when we know our precision is limited.
Thank you for moving it to a shim Kevin!

@chrisseaton
Copy link
Contributor

Looks good.

nirvdrum added a commit that referenced this pull request Dec 23, 2015
[Truffle] Upgraded from Rubinius 2.5.6 to 2.7.
@nirvdrum nirvdrum merged commit ab235df into truffle-head Dec 23, 2015
@nirvdrum nirvdrum deleted the rbx-2.7-upgrade branch December 23, 2015 15:18
@nirvdrum nirvdrum added this to the truffle-dev milestone Dec 23, 2015
@enebo enebo added this to the Non-Release milestone Dec 7, 2017
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.

None yet

4 participants