Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/uri/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -889,13 +889,16 @@ module Kernel
# Returns a \URI object derived from the given +uri+,
# which may be a \URI string or an existing \URI object:
#
# require 'uri'
# # 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>
#
# You must require 'uri' to use this method.
#
def URI(uri)
if uri.is_a?(URI::Generic)
uri
Expand Down