summaryrefslogtreecommitdiff
path: root/lib/uri/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/uri/common.rb')
-rw-r--r--lib/uri/common.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index 21aa960974..dce09fbc1e 100644
--- a/lib/uri/common.rb
+++ b/lib/uri/common.rb
@@ -829,7 +829,15 @@ end # module URI
module Kernel
#
- # Returns +uri+ converted to an URI object.
+ # Returns a \URI object derived from the given +uri+,
+ # which may be a \URI string or an existing \URI object:
+ #
+ # # Returns a new URI.
+ # uri = URI('http://github.com/ruby/ruby')
+ # # => #<URI::HTTP http://github.com/ruby/ruby>
+ # # Returns the given URI.
+ # URI(uri)
+ # # => #<URI::HTTP http://github.com/ruby/ruby>
#
def URI(uri)
if uri.is_a?(URI::Generic)