diff options
Diffstat (limited to 'lib/open-uri.rb')
-rw-r--r-- | lib/open-uri.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 && |