summaryrefslogtreecommitdiffstats
path: root/lib/uri/common.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-05 14:06:10 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-05 14:06:10 +0000
commitc9e950b2396427eab7859b0ddd8415e43f86e739 (patch)
treeb163552044e56809cc6293571bf02447775c1b32 /lib/uri/common.rb
parent856c6f1b7e068220800e9d5d502beb6e41e00a19 (diff)
downloadruby-c9e950b2396427eab7859b0ddd8415e43f86e739.tar.gz
ruby-c9e950b2396427eab7859b0ddd8415e43f86e739.tar.xz
ruby-c9e950b2396427eab7859b0ddd8415e43f86e739.zip
* lib/uri/common.rb (Kernel#URI): new global method for parsing URIs.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/uri/common.rb')
-rw-r--r--lib/uri/common.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index 175ef9730..f5772084e 100644
--- a/lib/uri/common.rb
+++ b/lib/uri/common.rb
@@ -595,3 +595,13 @@ module URI
end
end
+
+module Kernel
+ # alias for URI.parse.
+ #
+ # This method is introduced at 1.8.2.
+ def URI(uri_str) # :doc:
+ URI.parse(uri_str)
+ end
+ module_function :URI
+end