diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-18 11:05:09 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-18 11:05:09 +0000 |
commit | b253fdb93db3c2157a6a147e0b621548fc7aad1a (patch) | |
tree | b5978a86c46ccd0ed30104fb9ac9e645f887b00e /lib/uri/common.rb | |
parent | 60626e3d0f5ff9f4a3e399376883af0794db0c19 (diff) | |
download | ruby-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.rb | 2 |
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) |