mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/uri/common.rb (URI.decode_www_form_component): Use String#b.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1c7f9073b0
commit
601f783827
2 changed files with 5 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Jul 31 18:32:25 2013 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/uri/common.rb (URI.decode_www_form_component): Use String#b.
|
||||
|
||||
Wed Jul 31 18:24:02 2013 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_mod_refine, mod_using, top_using): don't show
|
||||
|
|
|
@ -899,9 +899,7 @@ module URI
|
|||
# See URI.encode_www_form_component, URI.decode_www_form
|
||||
def self.decode_www_form_component(str, enc=Encoding::UTF_8)
|
||||
raise ArgumentError, "invalid %-encoding (#{str})" unless /\A[^%]*(?:%\h\h[^%]*)*\z/ =~ str
|
||||
str.dup.force_encoding("ASCII-8BIT") \
|
||||
.gsub(/\+|%\h\h/, TBLDECWWWCOMP_) \
|
||||
.force_encoding(enc)
|
||||
str.b.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc)
|
||||
end
|
||||
|
||||
# Generate URL-encoded form data from given +enum+.
|
||||
|
|
Loading…
Add table
Reference in a new issue