diff options
-rw-r--r-- | sample/test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sample/test.rb b/sample/test.rb index 532b485c8c..3f24bd071a 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1674,7 +1674,10 @@ if defined? Process.kill $x = 0 trap "SIGINT", Proc.new{|sig| $x = 2} Process.kill "SIGINT", $$ - sleep 0.1 + 100.times { + sleep 0.1 + break if $x != 0 + } test_ok($x == 2) trap "SIGINT", Proc.new{raise "Interrupt"} |