-
Notifications
You must be signed in to change notification settings - Fork 63
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
Random does not behave like the specs #919
Comments
This seems like an implementation detail. I'm surprised that specs are coded to expect certain random output. I don't currently consider this a bug, but maybe there's some useful "feature" here I'm missing. |
I think that's more of a discussion for the ruby-spec list. As far as I could find, the But given that it's in the spec so all other major implementations have the same output, there are probably people who depend on it. https://xkcd.com/1172/ |
Fair point, but I'm also OK with being a little bit different here. Natalie can never be a 100% fully compatible Ruby. At the very least, I think we could shelve this until down the road when it is actually a problem for someone. |
I've finally added an issue in the ruby/spec repository about this issue (ruby/spec#1051). I think we can close this issue for now, and create a new issue if we decide to handle this. |
An observation from #918
MRI's
Random
has a reproducible output based on the seed. The docs show a few examples, like:I can reproduce this to return 47 on my local machine's MRI. On Natalie, it return 19 for me.
The documentation (emphasis mine)
It does not disclose how it has been altered, so I guess we'll need to distill that from the MRI source. I'm not sure what kind of legal (Copyright etc) implications that may have.
The text was updated successfully, but these errors were encountered: