diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-21 14:15:04 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-21 14:15:04 +0000 |
commit | bf287424fd00c0304c836525bb52d89fc1f4a84a (patch) | |
tree | 137fbb960f139d31ca13a8f6d5fd897db32ed808 /lib/open-uri.rb | |
parent | 7a54b5b4cea05369e6f3a3e85b7bb88a653ed472 (diff) | |
download | ruby-bf287424fd00c0304c836525bb52d89fc1f4a84a.tar.gz |
open-uri defines URI.open defined as an alias.
open-uri's Kernel.open will be deprecated in future.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/open-uri.rb')
-rw-r--r-- | lib/open-uri.rb | 7 |
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 |