lib/uri/generic.rb: fix error in docs for URI::Generic#opaque

* lib/uri/generic.rb: [DOC] fix description of URI::Generic#opaque,
  and add an example. According to RFC2396, opaque path components do not
  use the slash "/" character, as opposed to hierarchical path components.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
stomar 2018-04-17 19:52:10 +00:00
Родитель ed510458b3
Коммит 0f6a665484
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -267,12 +267,13 @@ module URI
#
attr_reader :query
# returns the opaque part of the URI.
# Returns the opaque part of the URI.
#
# URI("mailto:foo@example.org").opaque #=> "foo@example.org"
# URI("http://foo/bar/baz").opaque #=> nil
#
# Portion of the path that does make use of the slash '/'.
# The path typically refers to the absolute path and the opaque part.
# The portion of the path that does not make use of the slash '/'.
# The path typically refers to an absolute path or an opaque part.
# (See RFC2396 Section 3 and 5.2.)
#
attr_reader :opaque