aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-01 21:17:25 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-01 21:17:25 +0000
commitc982af7642b88af52826921ea3171894fe3b0bb7 (patch)
tree6919c44451c608fb8a26a16b42a9bb51fd291e94
parent5a418d59c2050c0a3c77905fd4ed9ac45f6b72c3 (diff)
downloadruby-c982af7642b88af52826921ea3171894fe3b0bb7.tar.gz
Used a fixed seed in Random#rand spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--spec/rubyspec/core/random/rand_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/rubyspec/core/random/rand_spec.rb b/spec/rubyspec/core/random/rand_spec.rb
index 2f10ed080a..e0cb133abd 100644
--- a/spec/rubyspec/core/random/rand_spec.rb
+++ b/spec/rubyspec/core/random/rand_spec.rb
@@ -172,13 +172,13 @@ describe "Random#rand with Range" do
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