summaryrefslogtreecommitdiff
path: root/test/ruby/test_rand.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-03 06:31:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-03 06:31:22 +0000
commit64712906b063d5470f74ef0b19d16e4aa84defdf (patch)
tree54c0eaa1d886580539e070806ef970bf59649612 /test/ruby/test_rand.rb
parent4cef2c8d6b61cc517191da781f777306823a05cb (diff)
random.c: endless range random
* random.c (range_values): cannot determine the domain of an endless range. [ruby-core:88261] [Bug #14958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rand.rb')
-rw-r--r--test/ruby/test_rand.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb
index 136ee4f912..ab9a1837f6 100644
--- a/test/ruby/test_rand.rb
+++ b/test/ruby/test_rand.rb
@@ -399,6 +399,7 @@ END
assert_raise(Errno::EDOM, Errno::ERANGE) { r.rand(1.0 / 0.0) }
assert_raise(Errno::EDOM, Errno::ERANGE) { r.rand(0.0 / 0.0) }
+ assert_raise(Errno::EDOM) {r.rand(1..)}
r = Random.new(0)
assert_in_delta(1.5488135039273248, r.rand(1.0...2.0), 0.0001, '[ruby-core:24655]')