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:
parent
da74f0f426
commit
cb0d480532
2 changed files with 9 additions and 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>
|
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
|
* proc.c (rb_proc_arity): return normal value (not -n-1) if it is not
|
||||||
|
|
|
@ -149,8 +149,12 @@ module OpenURI
|
||||||
begin
|
begin
|
||||||
yield io
|
yield io
|
||||||
ensure
|
ensure
|
||||||
|
if io.kind_of? Tempfile
|
||||||
|
io.close!
|
||||||
|
else
|
||||||
io.close
|
io.close
|
||||||
end
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
io
|
io
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue