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:
hone 2014-08-07 04:59:52 +00:00
parent 85940811e2
commit 5082e91876
2 changed files with 8 additions and 2 deletions

View File

@ -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>
* util.c (ruby_strtod): ignore too long fraction part, which does not

View File

@ -762,7 +762,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
raise ArgumentError, "invalid %-encoding (#{str})" unless /\A[^%]*(?:%\h\h[^%]*)*\z/ =~ str
str.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc)
end
@ -798,7 +798,7 @@ module URI
str
end
WFKV_ = '(?:%\h\h|[^%#=;&])' # :nodoc:
WFKV_ = '(?:[^%#=;&]*(?:%\h\h[^%#=;&]*)*)' # :nodoc:
# Decode URL-encoded form data from given +str+.
#