Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #556 from jstepien/random-srand
Random#srand
- Loading branch information
Showing
with
38 additions
and 18 deletions.
@@ -1,6 +1,4 @@ | ||
fails:Random.new uses a random seed value if none is supplied | ||
fails:Random.new accepts an Integer seed value as an argument | ||
fails:Random.new accepts (and truncates) a Float seed value as an argument | ||
fails:Random.new accepts (and converts to Integer) a Rational seed value as an argument | ||
fails:Random.new accepts (and converts to Integer) a Complex (without imaginary part) seed value as an argument | ||
fails:Random.new raises a RangeError if passed a Complex (with imaginary part) seed value as an argument |
@@ -1,5 +1 @@ | ||
fails:Random#seed returns an Integer | ||
fails:Random#seed returns an arbitrary seed if the constructor was called without arguments | ||
fails:Random#seed returns the same generated seed when repeatedly called on the same object | ||
fails:Random#seed returns the seed given in the constructor | ||
fails:Random#seed returns the given seed coerced with #to_int |