summaryrefslogtreecommitdiffstats
path: root/lib/uri/common.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-18 11:05:09 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-18 11:05:09 +0000
commitb253fdb93db3c2157a6a147e0b621548fc7aad1a (patch)
treeb5978a86c46ccd0ed30104fb9ac9e645f887b00e /lib/uri/common.rb
parent60626e3d0f5ff9f4a3e399376883af0794db0c19 (diff)
downloadruby-b253fdb93db3c2157a6a147e0b621548fc7aad1a.tar.gz
ruby-b253fdb93db3c2157a6a147e0b621548fc7aad1a.tar.xz
ruby-b253fdb93db3c2157a6a147e0b621548fc7aad1a.zip
* lib/uri/common.rb (unescape): skip '%' to make String#hex work
correctly. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/uri/common.rb')
-rw-r--r--lib/uri/common.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index 98dda2a35..9a6a06894 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)