diff --git a/ChangeLog b/ChangeLog index 560a00ea72..59a4f43736 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ +Thu Sep 18 20:02:48 2008 Yusuke Endoh + + * lib/uri/common.rb (unescape): skip '%' to make String#hex work + correctly. + Thu Sep 18 19:43:04 2008 Yusuke Endoh * st.c (new_size): raise RuntimeError when st_table is too big. + [ruby-dev:36354] Thu Sep 18 18:23:23 2008 Tanaka Akira diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 98dda2a350..9a6a06894a 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -227,7 +227,7 @@ module URI 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)