ruby-changes:14085
From: usa <ko1@a...>
Date: Tue, 24 Nov 2009 10:37:55 +0900 (JST)
Subject: [ruby-changes:14085] Ruby:r25898 (trunk): * bootstraptest/test_thread.rb: propagate the exception within a thread to
usa 2009-11-24 10:30:00 +0900 (Tue, 24 Nov 2009) New Revision: 25898 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25898 Log: * bootstraptest/test_thread.rb: propagate the exception within a thread to outer. Modified files: trunk/bootstraptest/test_thread.rb Index: bootstraptest/test_thread.rb =================================================================== --- bootstraptest/test_thread.rb (revision 25897) +++ bootstraptest/test_thread.rb (revision 25898) @@ -393,9 +393,14 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/