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

ruby-changes:35341

From: normal <ko1@a...>
Date: Sat, 6 Sep 2014 08:11:23 +0900 (JST)
Subject: [ruby-changes:35341] normal:r47423 (trunk): test/ruby/test_io.rb: use IO#nonblock=

normal	2014-09-06 08:11:15 +0900 (Sat, 06 Sep 2014)

  New Revision: 47423

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

  Log:
    test/ruby/test_io.rb: use IO#nonblock=
    
    * test/ruby/test_io.rb (test_readpartial_locktmp): use IO#nonblock=
      Old fcntl invocation may drop necessary flags on some platforms.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_io.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47422)
+++ ChangeLog	(revision 47423)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Sep  6 08:10:44 2014  Eric Wong  <e@8...>
+
+	* test/ruby/test_io.rb (test_readpartial_locktmp): use IO#nonblock=
+	  Old fcntl invocation may drop necessary flags on some platforms.
+
 Sat Sep  6 07:46:51 2014  Eric Wong  <e@8...>
 
 	* test/ruby/test_io.rb (test_readpartial_locktmp): avoid EBADF
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 47422)
+++ test/ruby/test_io.rb	(revision 47423)
@@ -2867,7 +2867,7 @@ End https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L2867
     th = nil
     with_pipe do |r,w|
       begin
-        r.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK)
+        r.nonblock = true
         th = Thread.new {r.readpartial(100, buf)}
 
         Thread.pass until th.stop?

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

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