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