improve docs for URI::Generic

* lib/uri/generic.rb: [DOC] expand docs for URI::Generic#normalize
  to clarify what normalization means here.
  Reported by Robert Gleeson.  [ruby-core:58430] [Bug #9127]

* lib/uri/generic.rb: [DOC] fix indent for correct code block detection.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
stomar 2017-03-19 15:01:05 +00:00
parent f30ed02b8a
commit 58c3935ec9

View File

@ -271,7 +271,7 @@ module URI
# #
# Portion of the path that does make use of the slash '/'. # Portion of the path that does make use of the slash '/'.
# The path typically refers to the absolute path and the opaque part. # The path typically refers to the absolute path and the opaque part.
# (see RFC2396 Section 3 and 5.2) # (See RFC2396 Section 3 and 5.2.)
# #
attr_reader :opaque attr_reader :opaque
@ -1293,7 +1293,17 @@ module URI
end end
# #
# Returns normalized URI # Returns normalized URI.
#
# require 'uri'
#
# URI("HTTP://my.EXAMPLE.com").normalize
# #=> #<URI::HTTP http://my.example.com/>
#
# Normalization here means:
#
# * scheme and host are converted to lowercase,
# * an empty path component is set to "/".
# #
def normalize def normalize
uri = dup uri = dup
@ -1438,8 +1448,8 @@ module URI
# #
# == Description # == Description
# #
# attempt to parse other URI +oth+ # attempts to parse other URI +oth+,
# return [parsed_oth, self] # returns [parsed_oth, self]
# #
# == Usage # == Usage
# #