diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-17 13:17:49 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-17 13:17:49 +0000 |
commit | cb0d480532c416ca6db0ca4d0ec8c0461b58f84c (patch) | |
tree | 53f389cbfa569f810338fa6899fd4161ca6e6de4 /lib/open-uri.rb | |
parent | da74f0f426072e97fee3494fbe9691e59bdf860b (diff) | |
download | ruby-cb0d480532c416ca6db0ca4d0ec8c0461b58f84c.tar.gz |
* lib/open-uri.rb: call io.close! for Tempfile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/open-uri.rb')
-rw-r--r-- | lib/open-uri.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/open-uri.rb b/lib/open-uri.rb index 6e24b40ba5..d3b26e1277 100644 --- a/lib/open-uri.rb +++ b/lib/open-uri.rb @@ -149,7 +149,11 @@ module OpenURI begin yield io ensure - io.close + if io.kind_of? Tempfile + io.close! + else + io.close + end end else io |