From b2d3995f4c8918bfd1ca5e9425242a64b9978291 Mon Sep 17 00:00:00 2001 From: kosaki Date: Tue, 17 May 2011 16:04:17 +0000 Subject: * test/ruby/test_io.rb (TestIO#test_O_CLOEXEC): add null check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ test/ruby/test_io.rb | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c52d28ebb7..106976f008 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed May 18 01:02:53 2011 KOSAKI Motohiro + + * test/ruby/test_io.rb (TestIO#test_O_CLOEXEC): add null check. + Tue May 17 21:24:04 2011 KOSAKI Motohiro * thread.c (rb_mutex_lock): remove remove_signal_thread_list() call. diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 9171dc6a31..f5f49f3efa 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1281,10 +1281,10 @@ class TestIO < Test::Unit::TestCase 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 -- cgit v1.2.3