From 0f6a6654849b2cfde0cf9eb8a66130b1aa92528d Mon Sep 17 00:00:00 2001 From: stomar Date: Tue, 17 Apr 2018 19:52:10 +0000 Subject: 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 --- lib/uri/generic.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3