ruby-changes:13609
From: naruse <ko1@a...>
Date: Sun, 18 Oct 2009 20:19:43 +0900 (JST)
Subject: [ruby-changes:13609] Ruby:r25392 (trunk): Retry until the signal is trapped.
naruse 2009-10-18 20:19:33 +0900 (Sun, 18 Oct 2009) New Revision: 25392 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25392 Log: Retry until the signal is trapped. Modified files: trunk/test/ruby/test_signal.rb Index: test/ruby/test_signal.rb =================================================================== --- test/ruby/test_signal.rb (revision 25391) +++ test/ruby/test_signal.rb (revision 25392) @@ -17,7 +17,10 @@ x = 0 oldtrap = Signal.trap(:INT) {|sig| x = 2 } Process.kill :INT, Process.pid - sleep 0.1 + 10.times do + break if 2 == x + sleep 0.1 + end assert_equal 2, x Signal.trap(:INT) { raise "Interrupt" } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/