diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-24 01:30:00 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-24 01:30:00 +0000 |
commit | f6fbdf261e30763a6eb23ede963d555f16806b15 (patch) | |
tree | 5b6aaba944a7fad1bd8c1a4c9f7a3deb0c002a11 /bootstraptest | |
parent | c796b348c6b4ce35a1dc4808881cd6177f3dfa96 (diff) | |
download | bundler-f6fbdf261e30763a6eb23ede963d555f16806b15.tar.gz |
* 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.rb | 7 |
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 |