summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-31 07:10:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-31 07:10:39 +0000
commita6273888a36bf068d39d31e5960b8c785732252a (patch)
tree0a53ef2e707098ed093823415e46443b81340e70
parent83b14c26aaf9d55774320ed65273b9c6d6c3c432 (diff)
fix the condition
* test/ruby/test_rubyoptions.rb: Process.wait with WNOHANG returns nil while the target process is alive. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_rubyoptions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 86b6022..d67cdcb 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -594,7 +594,7 @@ class TestRubyOptions < Test::Unit::TestCase
sleep 0.1
ps = `#{PSCMD.join(' ')} #{pid}`
break if /hello world/ =~ ps
- end while Process.wait(pid, Process::WNOHANG)
+ end until Process.wait(pid, Process::WNOHANG)
assert_match(/hello world/, ps)
Process.kill :KILL, pid
Process.wait(pid)
@@ -620,7 +620,7 @@ class TestRubyOptions < Test::Unit::TestCase
sleep 0.1
ps = `#{PSCMD.join(' ')} #{pid}`
break if /hello world/ =~ ps
- end while Process.wait(pid, Process::WNOHANG)
+ end until Process.wait(pid, Process::WNOHANG)
assert_match(/hello world/, ps)
Process.kill :KILL, pid
Process.wait(pid)