From f6fbdf261e30763a6eb23ede963d555f16806b15 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 24 Nov 2009 01:30:00 +0000 Subject: [PATCH] * bootstraptest/test_thread.rb: propagate the exception within a thread to outer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_thread.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index 5fd1d18e96..446c9ff4d2 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -393,9 +393,14 @@ assert_equal 'ok', %{ m = Mutex.new Thread.new { m.lock; sleep 1 } sleep 0.3 + parent = Thread.current Thread.new do sleep 0.3 - fork { GC.start } + begin + fork { GC.start } + rescue Exception + parent.raise $! + end end m.lock pid, status = Process.wait2