diff options
Diffstat (limited to 'bootstraptest/test_thread.rb')
-rw-r--r-- | bootstraptest/test_thread.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index ce90737ebf..e586ee274e 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -216,6 +216,18 @@ assert_equal 'true', %{ end } +assert_equal 'ok', %{ + open("zzz.rb", "w") do |f| + f.puts <<-END + Thread.new { fork { GC.start } }.join + pid, status = Process.wait2 + $result = status.success? ? :ok : :ng + END + end + require "zzz.rb" + $result +} + assert_finish 3, %{ th = Thread.new {sleep 2} th.join(1) |