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: use respond_to? to test Tempfile.

[ruby-dev:45995] [Bug #6781] reported by hsbt (Hiroshi SHIBATA).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2012-07-23 13:49:56 +00:00
parent dafab791d5
commit ab63cdf1ab
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Mon Jul 23 22:48:19 2012 Tanaka Akira <akr@fsij.org>
* lib/open-uri.rb: use respond_to? to test Tempfile.
[ruby-dev:45995] [Bug #6781] reported by hsbt (Hiroshi SHIBATA).
Mon Jul 23 14:43:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (LIBPATHENV): LIBPATH is used on AIX, but not

View file

@ -149,8 +149,8 @@ module OpenURI
begin
yield io
ensure
if io.kind_of? Tempfile
io.close!
if io.respond_to? :close!
io.close! # Tempfile
else
io.close
end