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] - Initial implementation of Ruby Random class. #2682

Merged
merged 1 commit into from Mar 13, 2015

Conversation

lucasallan
Copy link
Member

Hey @chrisseaton @nirvdrum could you guys take a look?
Thanks!

@@ -0,0 +1,177 @@
#
# Extracted from https://github.com/rubinius/rubinius/blob/v2.4.1/kernel/common/random.rb
#
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be the full Rubinius license. Can you copy from another file in common?

Copy link
Member Author

Choose a reason for hiding this comment

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

For sure. give me a minute.

@@ -0,0 +1,203 @@
# Copyright (c) 2007-2014, Evan Phoenix and contributors
Copy link
Member Author

Choose a reason for hiding this comment

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

@chrisseaton Done!

}

@Specialization
public Long randomizerSeed(RubyBasicObject random) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be just long

@chrisseaton
Copy link
Contributor

It looks like you've gotten the idea of how to import code form Rubinius - but you have some failures in the core specs and FindBugs - see the Travis report. Also, maybe you were doing a trivial initial implementation, but you actually need to implement a PRNG using the seed in the randomiser primitives.

@lucasallan lucasallan force-pushed the random-class branch 5 times, most recently from d49952c to d21619d Compare March 12, 2015 20:20
@chrisseaton
Copy link
Contributor

Just waiting for Travis to finish...

chrisseaton added a commit that referenced this pull request Mar 13, 2015
[Truffle] - Initial implementation of Ruby Random class.
@chrisseaton chrisseaton merged commit ae5a644 into jruby:master Mar 13, 2015
@chrisseaton chrisseaton added this to the truffle-dev milestone Mar 13, 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

3 participants