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:
parent
d374004467
commit
58a9bf0c4c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue