[前][次][番号順一覧][スレッド一覧]

ruby-changes:51332

From: nobu <ko1@a...>
Date: Thu, 31 May 2018 16:10:43 +0900 (JST)
Subject: [ruby-changes:51332] nobu:r63538 (trunk): fix the condition

nobu	2018-05-31 16:10:39 +0900 (Thu, 31 May 2018)

  New Revision: 63538

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63538

  Log:
    fix the condition
    
    * test/ruby/test_rubyoptions.rb: Process.wait with WNOHANG returns
      nil while the target process is alive.

  Modified files:
    trunk/test/ruby/test_rubyoptions.rb
Index: test/ruby/test_rubyoptions.rb
===================================================================
--- test/ruby/test_rubyoptions.rb	(revision 63537)
+++ test/ruby/test_rubyoptions.rb	(revision 63538)
@@ -594,7 +594,7 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L594
         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::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L620
         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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]