summaryrefslogtreecommitdiff
path: root/lib/uri
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
commit4046a1cb92094d5227bc98e7e2eec14c08b65652 (patch)
treeb5978a86c46ccd0ed30104fb9ac9e645f887b00e /lib/uri
parentb11b2b498c741e08e11e8e51cf5c86dea00ff103 (diff)
* lib/uri/common.rb (unescape): skip '%' to make String#hex work
correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/uri')
-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 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)