diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_rand.rb | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Thu Oct 22 08:03:49 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com> + + * test/ruby/test_rand.rb (TestRand#test_default_seed): add + srand case. + Thu Oct 22 06:33:38 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com> * random.c (InitVM_Random): move Random::DEFAULT initialization diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb index db2d4578b8..4da1559e40 100644 --- a/test/ruby/test_rand.rb +++ b/test/ruby/test_rand.rb @@ -531,6 +531,10 @@ END rand1 = Random::DEFAULT::rand rand2 = Random.new(seed).rand assert_equal(rand1, rand2) + + srand seed + rand3 = rand + assert_equal(rand1, rand3) End end end |