1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05: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:
akr 2012-07-17 13:17:49 +00:00
parent da74f0f426
commit cb0d480532
2 changed files with 9 additions and 1 deletions

View file

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

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