ruby-changes:20579
From: naruse <ko1@a...>
Date: Fri, 22 Jul 2011 21:50:37 +0900 (JST)
Subject: [ruby-changes:20579] naruse:r32627 (ruby_1_9_3): merge revision(s) 32622:
naruse 2011-07-22 21:50:22 +0900 (Fri, 22 Jul 2011) New Revision: 32627 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32627 Log: merge revision(s) 32622: * lib/uri/generic.rb (WFKV_): unroll the loop of regexp. * lib/uri/generic.rb (URI.decode_www_form_component): ditto. Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/lib/uri/common.rb Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 32626) +++ ruby_1_9_3/ChangeLog (revision 32627) @@ -1,3 +1,9 @@ +Fri Jul 22 21:50:16 2011 NARUSE, Yui <naruse@r...> + + * lib/uri/generic.rb (WFKV_): unroll the loop of regexp. + + * lib/uri/generic.rb (URI.decode_www_form_component): ditto. + Fri Jul 22 21:49:48 2011 NARUSE, Yui <naruse@r...> * enum.c (enum_inject): remove empty line to notify rdoc Index: ruby_1_9_3/lib/uri/common.rb =================================================================== --- ruby_1_9_3/lib/uri/common.rb (revision 32626) +++ ruby_1_9_3/lib/uri/common.rb (revision 32627) @@ -908,7 +908,7 @@ rescue end end - 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 @@ -960,7 +960,7 @@ end.join('&') end - WFKV_ = '(?:%\h\h|[^%#=;&])' # :nodoc: + WFKV_ = '(?:[^%#=;&]*(?:%\h\h[^%#=;&]*)*)' # :nodoc: # Decode URL-encoded form data from given +str+. # -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/