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

ruby-changes:19571

From: kosaki <ko1@a...>
Date: Wed, 18 May 2011 01:13:28 +0900 (JST)
Subject: [ruby-changes:19571] kosaki:r31611 (trunk): * test/ruby/test_io.rb (TestIO#test_O_CLOEXEC): add null check.

kosaki	2011-05-18 01:04:17 +0900 (Wed, 18 May 2011)

  New Revision: 31611

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

  Log:
    * test/ruby/test_io.rb (TestIO#test_O_CLOEXEC): add null check.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_io.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31610)
+++ ChangeLog	(revision 31611)
@@ -1,3 +1,7 @@
+Wed May 18 01:02:53 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* test/ruby/test_io.rb (TestIO#test_O_CLOEXEC): add null check.
+
 Tue May 17 21:24:04 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* thread.c (rb_mutex_lock): remove remove_signal_thread_list() call.
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 31610)
+++ test/ruby/test_io.rb	(revision 31611)
@@ -1281,10 +1281,10 @@
         while (e = ary.shift) != nil
           e.close
         end
-        arg.close unless arg.closed?
-        argw.close unless argw.closed?
-        ret.close unless ret.closed?
-        retw.close unless retw.closed?
+        arg.close  unless !arg  || arg.closed?
+        argw.close unless !argw || argw.closed?
+        ret.close  unless !ret  || ret.closed?
+        retw.close unless !retw || retw.closed?
       end
     end
   end

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

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