diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-31 07:10:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-31 07:10:39 +0000 |
commit | 007437b18e7539fb76674d83ef4fa8e9620f199f (patch) | |
tree | 0a53ef2e707098ed093823415e46443b81340e70 /test/ruby | |
parent | 8ffe38ac30ab00df4da56c35afc8d168914ef5a6 (diff) | |
download | ruby-007437b18e7539fb76674d83ef4fa8e9620f199f.tar.gz |
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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 86b6022b82..d67cdcb984 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) |