summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-17 19:52:10 +0000
committerstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-17 19:52:10 +0000
commit0f6a6654849b2cfde0cf9eb8a66130b1aa92528d (patch)
treea761d031e34367c601ee8ef38dbbb51db008e304 /lib
parented510458b3584f2458fe8dff6bf475e422bfa429 (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/uri/generic.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb
index da7e3c5263..7a05438f88 100644
--- a/lib/uri/generic.rb
+++ b/lib/uri/generic.rb
@@ -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