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 | 73e59d0102fdec028fa59002587306a834372877 (patch) | |
| tree | 5b6aaba944a7fad1bd8c1a4c9f7a3deb0c002a11 | |
| parent | 4a9f8942e3054a78f518f7dcec5be224cc60381a (diff) | |
| download | ruby-73e59d0102fdec028fa59002587306a834372877.tar.gz ruby-73e59d0102fdec028fa59002587306a834372877.tar.xz ruby-73e59d0102fdec028fa59002587306a834372877.zip | |
* bootstraptest/test_thread.rb: propagate the exception within a thread to
outer.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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 5fd1d18e9..446c9ff4d 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 |
