* 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:
akr 2012-07-17 13:17:49 +00:00
parent da74f0f426
commit cb0d480532
2 changed files with 9 additions and 1 deletions

View file

@ -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