diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-17 16:04:17 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-17 16:04:17 +0000 |
commit | b2d3995f4c8918bfd1ca5e9425242a64b9978291 (patch) | |
tree | e66fcfd2038e879ad8638e03e3f1cc13a3a145c1 /test/ruby | |
parent | 63d3eec7c4f2aacc8f78b0d10571b0d256e813d7 (diff) | |
download | ruby-b2d3995f4c8918bfd1ca5e9425242a64b9978291.tar.gz |
* 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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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 |