-
-
Notifications
You must be signed in to change notification settings - Fork 921
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
Conversation
@@ -0,0 +1,177 @@ | |||
# | |||
# Extracted from https://github.com/rubinius/rubinius/blob/v2.4.1/kernel/common/random.rb | |||
# |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
e86587c
to
8c59aae
Compare
@@ -0,0 +1,203 @@ | |||
# Copyright (c) 2007-2014, Evan Phoenix and contributors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisseaton Done!
8c59aae
to
f06c21e
Compare
} | ||
|
||
@Specialization | ||
public Long randomizerSeed(RubyBasicObject random) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be just long
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. |
d49952c
to
d21619d
Compare
Just waiting for Travis to finish... |
[Truffle] - Initial implementation of Ruby Random class.
Hey @chrisseaton @nirvdrum could you guys take a look?
Thanks!