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

ruby-changes:41042

From: hsbt <ko1@a...>
Date: Tue, 15 Dec 2015 11:56:52 +0900 (JST)
Subject: [ruby-changes:41042] hsbt:r53119 (trunk): * lib/uri/common.rb: make code block for rdoc.

hsbt	2015-12-15 11:56:38 +0900 (Tue, 15 Dec 2015)

  New Revision: 53119

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

  Log:
    * lib/uri/common.rb: make code block for rdoc.
      [ci skip][fix GH-1152] Patch by @Tonkpils

  Modified files:
    trunk/ChangeLog
    trunk/lib/uri/common.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53118)
+++ ChangeLog	(revision 53119)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Dec 15 11:56:24 2015  SHIBATA Hiroshi  <hsbt@r...>
+
+	* lib/uri/common.rb: make code block for rdoc.
+	  [ci skip][fix GH-1152] Patch by @Tonkpils
+
 Tue Dec 15 11:55:08 2015  SHIBATA Hiroshi  <hsbt@r...>
 
 	* ext/zlib/zlib.c: fix a typo.
Index: lib/uri/common.rb
===================================================================
--- lib/uri/common.rb	(revision 53118)
+++ lib/uri/common.rb	(revision 53119)
@@ -438,12 +438,12 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/common.rb#L438
   # This refers http://url.spec.whatwg.org/#concept-urlencoded-parser ,
   # so this supports only &-separator, don't support ;-separator.
   #
-  # ary = URI.decode_www_form("a=1&a=2&b=3")
-  # p ary                  #=> [['a', '1'], ['a', '2'], ['b', '3']]
-  # p ary.assoc('a').last  #=> '1'
-  # p ary.assoc('b').last  #=> '3'
-  # p ary.rassoc('a').last #=> '2'
-  # p Hash[ary]            # => {"a"=>"2", "b"=>"3"}
+  #    ary = URI.decode_www_form("a=1&a=2&b=3")
+  #    p ary                  #=> [['a', '1'], ['a', '2'], ['b', '3']]
+  #    p ary.assoc('a').last  #=> '1'
+  #    p ary.assoc('b').last  #=> '3'
+  #    p ary.rassoc('a').last #=> '2'
+  #    p Hash[ary]            # => {"a"=>"2", "b"=>"3"}
   #
   # See URI.decode_www_form_component, URI.encode_www_form
   def self.decode_www_form(str, enc=Encoding::UTF_8, separator: '&', use__charset_: false, isindex: false)

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

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