[前][次][番号順一覧][スレッド一覧]

ruby-changes:50979

From: stomar <ko1@a...>
Date: Wed, 18 Apr 2018 04:52:30 +0900 (JST)
Subject: [ruby-changes:50979] stomar:r63186 (trunk): lib/uri/generic.rb: fix error in docs for URI::Generic#opaque

stomar	2018-04-18 04:52:10 +0900 (Wed, 18 Apr 2018)

  New Revision: 63186

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63186

  Log:
    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.

  Modified files:
    trunk/lib/uri/generic.rb
Index: lib/uri/generic.rb
===================================================================
--- lib/uri/generic.rb	(revision 63185)
+++ lib/uri/generic.rb	(revision 63186)
@@ -267,12 +267,13 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/generic.rb#L267
     #
     attr_reader :query
 
-    # returns the opaque part of the URI.
+    # Returns the opaque part of the URI.
     #
     #   URI("mailto:foo@e...").opaque #=> "foo@e..."
+    #   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]