mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
* 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
This commit is contained in:
parent
da74f0f426
commit
cb0d480532
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue