[前][次][番号順一覧][スレッド一覧]

ruby-changes:35011

From: hone <ko1@a...>
Date: Thu, 7 Aug 2014 14:00:13 +0900 (JST)
Subject: [ruby-changes:35011] hone:r47092 (ruby_1_9_2): merge revision(s) 32622:

hone	2014-08-07 13:59:52 +0900 (Thu, 07 Aug 2014)

  New Revision: 47092

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47092

  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.
    
    Conflicts:
    ChangeLog
    lib/uri/common.rb

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/lib/uri/common.rb
Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 47091)
+++ ruby_1_9_2/ChangeLog	(revision 47092)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_2/ChangeLog#L1
+Fri Jul 22 21:18:20 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 Nov 22 12:43:52 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* util.c (ruby_strtod): ignore too long fraction part, which does not
Index: ruby_1_9_2/lib/uri/common.rb
===================================================================
--- ruby_1_9_2/lib/uri/common.rb	(revision 47091)
+++ ruby_1_9_2/lib/uri/common.rb	(revision 47092)
@@ -762,7 +762,7 @@ module URI https://github.com/ruby/ruby/blob/trunk/ruby_1_9_2/lib/uri/common.rb#L762
   #
   # 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 https://github.com/ruby/ruby/blob/trunk/ruby_1_9_2/lib/uri/common.rb#L798
     str
   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/

[前][次][番号順一覧][スレッド一覧]