ruby-changes:47133
From: eregon <ko1@a...>
Date: Sun, 2 Jul 2017 06:17:32 +0900 (JST)
Subject: [ruby-changes:47133] eregon:r59248 (trunk): Used a fixed seed in Random#rand spec
eregon 2017-07-02 06:17:25 +0900 (Sun, 02 Jul 2017) New Revision: 59248 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59248 Log: Used a fixed seed in Random#rand spec Modified files: trunk/spec/rubyspec/core/random/rand_spec.rb Index: spec/rubyspec/core/random/rand_spec.rb =================================================================== --- spec/rubyspec/core/random/rand_spec.rb (revision 59247) +++ spec/rubyspec/core/random/rand_spec.rb (revision 59248) @@ -172,13 +172,13 @@ describe "Random#rand with Range" do https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/core/random/rand_spec.rb#L172 end it "works with inclusive ranges" do - prng = Random.new + prng = Random.new 33 r = 3..5 40.times.map { prng.rand(r) }.uniq.sort.should == [3,4,5] end it "works with exclusive ranges" do - prng = Random.new + prng = Random.new 33 r = 3...5 20.times.map { prng.rand(r) }.uniq.sort.should == [3,4] end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/