There's no documentation for this item.
Source Code
# File webrick/httputils.rb, line 21 def normalize_path(path) raise "abnormal path `#{path}'" if path[0] != ?/ ret = path.dup ret.gsub!(%r{/+}o, '/') # // => / while ret.sub!(%r{/\.(/|\Z)}o, '/'); end # /. => / begin # /foo/.. => /foo match = ret.sub!(%r{/([^/]+)/\.\.(/|\Z)}o){ if $1 == ".." raise "abnormal path `#{path}'" else "/" end } end while match raise "abnormal path `#{path}'" if %r{/\.\.(/|\Z)} =~ ret ret end
<code/>and<pre/>for code samples.