merge revision(s) 32622:
* lib/uri/generic.rb (WFKV_): unroll the loop of regexp. * lib/uri/generic.rb (URI.decode_www_form_component): ditto. Conflicts: ChangeLog lib/uri/common.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@47092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
85940811e2
commit
5082e91876
@ -1,3 +1,9 @@
|
|||||||
|
Fri Jul 22 21:18:20 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/uri/generic.rb (WFKV_): unroll the loop of regexp.
|
||||||
|
|
||||||
|
* lib/uri/generic.rb (URI.decode_www_form_component): ditto.
|
||||||
|
|
||||||
Fri Nov 22 12:43:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Nov 22 12:43:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* util.c (ruby_strtod): ignore too long fraction part, which does not
|
* util.c (ruby_strtod): ignore too long fraction part, which does not
|
||||||
|
@ -762,7 +762,7 @@ module URI
|
|||||||
#
|
#
|
||||||
# See URI.encode_www_form_component, URI.decode_www_form
|
# See URI.encode_www_form_component, URI.decode_www_form
|
||||||
def self.decode_www_form_component(str, enc=Encoding::UTF_8)
|
def self.decode_www_form_component(str, enc=Encoding::UTF_8)
|
||||||
raise ArgumentError, "invalid %-encoding (#{str})" unless /\A(?:%\h\h|[^%]+)*\z/ =~ str
|
raise ArgumentError, "invalid %-encoding (#{str})" unless /\A[^%]*(?:%\h\h[^%]*)*\z/ =~ str
|
||||||
str.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc)
|
str.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -798,7 +798,7 @@ module URI
|
|||||||
str
|
str
|
||||||
end
|
end
|
||||||
|
|
||||||
WFKV_ = '(?:%\h\h|[^%#=;&])' # :nodoc:
|
WFKV_ = '(?:[^%#=;&]*(?:%\h\h[^%#=;&]*)*)' # :nodoc:
|
||||||
|
|
||||||
# Decode URL-encoded form data from given +str+.
|
# Decode URL-encoded form data from given +str+.
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user