summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/open-uri.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index a68413e8f8..c0ef89c2ec 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -40,6 +40,13 @@ module Kernel
module_function :open
end
+module URI #:nodoc:
+ # alias for Kernel.open defined in open-uri.
+ def self.open(name, *rest, &block)
+ Kernel.open(name, *rest, &block)
+ end
+end
+
# OpenURI is an easy-to-use wrapper for Net::HTTP, Net::HTTPS and Net::FTP.
#
# == Example