Random#initialize with a String
Random#initialize only accepts an
It would be useful to accept a
String to feed the seed from external sources, I think.
Updated by naruse (Yui NARUSE) over 4 years ago
This proposal is not described about "external sources" in detail, and use cases.
If this proposal want to pass data to init_by_array, the intention is clear.
But string is still ambiguous because of its endian.
Updated by Eregon (Benoit Daloze) over 4 years ago
Nobuyoshi Nakada wrote:
I found that rubyspec fails.
Maybe, an alternative is an optional parameter of
Random.new_seedfor the precision.
I think it's fine to change the ruby/spec to adapt for this.
The test just intends to verify that argument checking is performed,
but of course a compatible evolution of the API like this seems fine.