summaryrefslogtreecommitdiff
path: root/lib/uri
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2023-01-08 17:14:44 -0600
committergit <svn-admin@ruby-lang.org>2023-01-08 23:14:50 +0000
commit41a947e72aba3804c60a111e73e54d81150bbb6d (patch)
treeafa3b769834c7729924ac5f276ea62b6aacb4d2a /lib/uri
parent20b691d664389470fdd312c094c73ca8c9b35339 (diff)
[ruby/uri] [DOC] Enhanced RDoc for URI
(https://github.com/ruby/uri/pull/55) https://github.com/ruby/uri/commit/89ab4f1407
Diffstat (limited to 'lib/uri')
-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)