ruby-changes:40738
From: kosaki <ko1@a...>
Date: Tue, 1 Dec 2015 05:33:11 +0900 (JST)
Subject: [ruby-changes:40738] kosaki:r52817 (trunk): * test/ruby/test_rand.rb (TestRand#test_default_seed): add
kosaki 2015-12-01 05:33:04 +0900 (Tue, 01 Dec 2015) New Revision: 52817 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52817 Log: * test/ruby/test_rand.rb (TestRand#test_default_seed): add srand case. Modified files: trunk/ChangeLog trunk/test/ruby/test_rand.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 52816) +++ ChangeLog (revision 52817) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Oct 22 08:03:49 2015 KOSAKI Motohiro <kosaki.motohiro@g...> + + * test/ruby/test_rand.rb (TestRand#test_default_seed): add + srand case. + Thu Oct 22 06:33:38 2015 KOSAKI Motohiro <kosaki.motohiro@g...> * random.c (InitVM_Random): move Random::DEFAULT initialization Index: test/ruby/test_rand.rb =================================================================== --- test/ruby/test_rand.rb (revision 52816) +++ test/ruby/test_rand.rb (revision 52817) @@ -531,6 +531,10 @@ END https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rand.rb#L531 rand1 = Random::DEFAULT::rand rand2 = Random.new(seed).rand assert_equal(rand1, rand2) + + srand seed + rand3 = rand + assert_equal(rand1, rand3) End end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/