Skip to content

Commit 89ab4f1

Browse files
[DOC] Enhanced RDoc for URI (#55)
1 parent ce379e6 commit 89ab4f1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/uri/common.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,15 @@ def self.get_encoding(label)
829829
module Kernel
830830

831831
#
832-
# Returns +uri+ converted to an URI object.
832+
# Returns a \URI object derived from the given +uri+,
833+
# which may be a \URI string or an existing \URI object:
834+
#
835+
# # Returns a new URI.
836+
# uri = URI('http://github.com/ruby/ruby')
837+
# # => #<URI::HTTP http://github.com/ruby/ruby>
838+
# # Returns the given URI.
839+
# URI(uri)
840+
# # => #<URI::HTTP http://github.com/ruby/ruby>
833841
#
834842
def URI(uri)
835843
if uri.is_a?(URI::Generic)

0 commit comments

Comments
 (0)