Bug #9127

URI::Generic#normalize documentation is vague.

Added by robertgleeson (Robert Gleeson) over 6 years ago. Updated about 3 years ago.

Target version:
ruby -v:


the documentation for URI::Generic#normalize is vague and does not provide enough details about the algorithm that applies normalization.
the documentation says, "Returns normalized URI" and nothing more. I would have expected a short piece that explains how normalization
is applied.

pry session attached (ruby = v2.0.0)

$ pry
[1] pry(main)> require "uri"
=> true

[2] pry(main)> uri = URI.parse("")
=> #

[3] pry(main)> ? uri.normalize
From: /Users/robert/.rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/uri/generic.rb @ line 1418:
Owner: URI::Generic
Visibility: public
Signature: normalize()
Number of lines: 2

Returns normalized URI


Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Tracker changed from Backport to Bug
  • Project changed from Backport200 to Ruby master

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Category set to doc
  • ruby -v set to -

Updated by zzak (Zachary Scott) over 6 years ago

  • Status changed from Open to Assigned
  • Assignee set to zzak (Zachary Scott)
  • Target version set to 2.2.0

Updated by stomar (Marcus Stollsteimer) about 3 years ago

  • Status changed from Assigned to Closed

Applied in changeset r58023.

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.

Also available in: Atom PDF