1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
akr 2003-11-13 11:54:31 +00:00
parent 7924fca23e
commit 810e7938fd
2 changed files with 2 additions and 2 deletions

View file

@ -1,4 +1,4 @@
Thu Nov 13 20:34:17 2003 Tanaka Akira <akr@m17n.org>
Thu Nov 13 20:53:35 2003 Tanaka Akira <akr@m17n.org>
* lib/open-uri.rb (Kernel[#.]open): hard coded URI schemes removed.
[ruby-ext:02251]

View file

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