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 | |
parent | da74f0f426072e97fee3494fbe9691e59bdf860b (diff) |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/open-uri.rb | 6 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Tue Jul 17 22:17:13 2012 Tanaka Akira <akr@fsij.org> + + * lib/open-uri.rb: call io.close! for Tempfile. + Tue Jul 17 16:41:32 2012 NARUSE, Yui <naruse@ruby-lang.org> * proc.c (rb_proc_arity): return normal value (not -n-1) if it is not 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 |