summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-24 01:30:00 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-24 01:30:00 +0000
commitf6fbdf261e30763a6eb23ede963d555f16806b15 (patch)
tree5b6aaba944a7fad1bd8c1a4c9f7a3deb0c002a11 /bootstraptest
parentc796b348c6b4ce35a1dc4808881cd6177f3dfa96 (diff)
* 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
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_thread.rb7
1 files changed, 6 insertions, 1 deletions
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