diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-03 19:30:10 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-03 19:30:10 +0000 |
commit | 58a9bf0c4c2fc5aa70d4b1875ea59332191cf112 (patch) | |
tree | dc7313813fedf987d0b921deae2846c22b1d9048 /test/open-uri | |
parent | d374004467bfa9873db630e726fb2d2c242dba4b (diff) |
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
Diffstat (limited to 'test/open-uri')
-rw-r--r-- | test/open-uri/test_open-uri.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb index 5f501d16cc..916b2af23f 100644 --- a/test/open-uri/test_open-uri.rb +++ b/test/open-uri/test_open-uri.rb @@ -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 |