summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-09 10:32:37 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-09 10:32:37 +0000
commit86024f70cff6c8029633467fd919f1b8cd9cd36c (patch)
treeffe692ccb27a0b8150d0ba6b68995c549a362165 /test
parent6b330d8fb0b855134b05a38082f1172836b8b567 (diff)
merge revision(s) 59368: [Backport #13753]
random.c: ensure initialized * random.c (get_rnd, try_get_rnd): ensure initialized to get rid of crash in forked processes. [ruby-core:82100] [Bug #13753] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rand.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb
index d4258a7f1c..ac1ef5292f 100644
--- a/test/ruby/test_rand.rb
+++ b/test/ruby/test_rand.rb
@@ -453,6 +453,10 @@ END
assert_fork_status(1, bug5661) {stable.rand(4)}
r1, r2 = *assert_fork_status(2, bug5661) {stable.rand}
assert_equal(r1, r2, bug5661)
+
+ assert_fork_status(1, '[ruby-core:82100] [Bug #13753]') do
+ Random::DEFAULT.rand(4)
+ end
rescue NotImplementedError
end