From 810e7938fd12989db83b59a3c2e467f400e0480a Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 13 Nov 2003 11:54:31 +0000 Subject: [PATCH] inconsistency of the arguments for respond_to? in previous change is fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 2 +- lib/open-uri.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 693fffd977..e545d645c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Thu Nov 13 20:34:17 2003 Tanaka Akira +Thu Nov 13 20:53:35 2003 Tanaka Akira * lib/open-uri.rb (Kernel[#.]open): hard coded URI schemes removed. [ruby-ext:02251] diff --git a/lib/open-uri.rb b/lib/open-uri.rb index d01496ce71..df6ea232d6 100644 --- a/lib/open-uri.rb +++ b/lib/open-uri.rb @@ -77,7 +77,7 @@ module Kernel # http:// and ftp://. In this http and ftp case, the opened file object # is extended by OpenURI::Meta. def open(name, *rest, &block) - if name.respond_to?("open") + if name.respond_to?(:open) name.open(*rest, &block) elsif name.respond_to?("to_str") && %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ name &&