[ruby/uri] [DOC] Enhanced RDoc for URI

(https://github.com/ruby/uri/pull/55)

https://github.com/ruby/uri/commit/89ab4f1407
This commit is contained in:
Burdette Lamar 2023-01-08 17:14:44 -06:00 committed by git
parent 20b691d664
commit 41a947e72a

View File

@ -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)