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

ruby-changes:7892

From: mame <ko1@a...>
Date: Thu, 18 Sep 2008 20:05:22 +0900 (JST)
Subject: [ruby-changes:7892] Ruby:r19413 (trunk): * lib/uri/common.rb (unescape): skip '%' to make String#hex work

mame	2008-09-18 20:05:09 +0900 (Thu, 18 Sep 2008)

  New Revision: 19413

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

  Log:
    * lib/uri/common.rb (unescape): skip '%' to make String#hex work
      correctly.

  Modified files:
    trunk/ChangeLog
    trunk/lib/uri/common.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19412)
+++ ChangeLog	(revision 19413)
@@ -1,6 +1,12 @@
+Thu Sep 18 20:02:48 2008  Yusuke Endoh  <mame@t...>
+
+	* lib/uri/common.rb (unescape): skip '%' to make String#hex work
+	  correctly.
+
 Thu Sep 18 19:43:04 2008  Yusuke Endoh  <mame@t...>
 
 	* st.c (new_size): raise RuntimeError when st_table is too big.
+	  [ruby-dev:36354]
 
 Thu Sep 18 18:23:23 2008  Tanaka Akira  <akr@f...>
 
Index: lib/uri/common.rb
===================================================================
--- lib/uri/common.rb	(revision 19412)
+++ lib/uri/common.rb	(revision 19413)
@@ -227,7 +227,7 @@
     end
 
     def unescape(str, escaped = @regexp[:ESCAPED])
-      str.gsub(escaped) { [$&.hex].pack('U') }
+      str.gsub(escaped) { [$&[1, 2].hex].pack('U') }
     end
 
     @@to_s = Kernel.instance_method(:to_s)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

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