1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Don't call f.close if f is nil or already closed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-04-03 19:30:10 +00:00
parent d374004467
commit 58a9bf0c4c

View file

@ -152,7 +152,7 @@ class TestOpenURI < Test::Unit::TestCase
assert_equal("200", f.status[0])
assert_equal("without_block", f.read)
ensure
f.close
f.close if f && !f.closed?
end
}
end