1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
hsbt 2015-12-15 02:56:38 +00:00
parent 79a6daa394
commit 68b69178f4
2 changed files with 11 additions and 6 deletions

View file

@ -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.

View file

@ -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)