diff options
author | Burdette Lamar <[email protected]> | 2023-01-08 17:14:44 -0600 |
---|---|---|
committer | git <[email protected]> | 2023-01-08 23:14:50 +0000 |
commit | 41a947e72aba3804c60a111e73e54d81150bbb6d (patch) | |
tree | afa3b769834c7729924ac5f276ea62b6aacb4d2a /lib/uri/common.rb | |
parent | 20b691d664389470fdd312c094c73ca8c9b35339 (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/common.rb')
-rw-r--r-- | lib/uri/common.rb | 10 |
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) |