ruby-changes:24449
From: akr <ko1@a...>
Date: Mon, 23 Jul 2012 22:50:12 +0900 (JST)
Subject: [ruby-changes:24449] akr:r36500 (trunk): * lib/open-uri.rb: use respond_to? to test Tempfile.
akr 2012-07-23 22:49:56 +0900 (Mon, 23 Jul 2012) New Revision: 36500 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36500 Log: * lib/open-uri.rb: use respond_to? to test Tempfile. [ruby-dev:45995] [Bug #6781] reported by hsbt (Hiroshi SHIBATA). Modified files: trunk/ChangeLog trunk/lib/open-uri.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 36499) +++ ChangeLog (revision 36500) @@ -1,3 +1,8 @@ +Mon Jul 23 22:48:19 2012 Tanaka Akira <akr@f...> + + * 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@r...> * configure.in (LIBPATHENV): LIBPATH is used on AIX, but not Index: lib/open-uri.rb =================================================================== --- lib/open-uri.rb (revision 36499) +++ lib/open-uri.rb (revision 36500) @@ -149,8 +149,8 @@ begin yield io ensure - if io.kind_of? Tempfile - io.close! + if io.respond_to? :close! + io.close! # Tempfile else io.close end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/