summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-15 02:56:38 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-15 02:56:38 +0000
commit68b69178f4b58abfb85495e93f7e05df247d7a1f (patch)
tree7218edf2cd8e3f1bf5075d212070274204248522
parent79a6daa394b64abdc61d84f7bdccef9423cb4502 (diff)
* lib/uri/common.rb: make code block for rdoc.
[ci skip][fix GH-1152] Patch by @Tonkpils git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/uri/common.rb12
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 07565f4496..38b9eedd31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Dec 15 11:56:24 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* ext/zlib/zlib.c: fix a typo.
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index 1444ae84b0..28b5c99789 100644
--- a/lib/uri/common.rb
+++ b/lib/uri/common.rb
@@ -438,12 +438,12 @@ module URI
# 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)