summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:49:35 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:49:35 +0000
commitc98a51f667b6c987601993269160b2c9f8d35215 (patch)
treec81f61651ddd128dd3d0db29d576d3218a56e6ca /test
parent3ac7927ea610c6c1c6e3fa86fc13751fe2e7cc64 (diff)
merges r25392 from trunk into ruby_1_9_1.
-- Retry until the signal is trapped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_signal.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb
index 9414b6539e..1ecf5401ab 100644
--- a/test/ruby/test_signal.rb
+++ b/test/ruby/test_signal.rb
@@ -17,7 +17,10 @@ class TestSignal < Test::Unit::TestCase
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" }