summaryrefslogtreecommitdiffstats
path: root/lib/webrick
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-30 10:46:40 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-30 10:46:40 +0000
commit605d257e1ae2635b480c62b302b610e086b4f48e (patch)
treeef05fd3ee7edf94a3762a247874c40c950f4bdc4 /lib/webrick
parent37c892c71794de5bc6a9c8b98a036c1e6813a06d (diff)
downloadruby-605d257e1ae2635b480c62b302b610e086b4f48e.tar.gz
ruby-605d257e1ae2635b480c62b302b610e086b4f48e.tar.xz
ruby-605d257e1ae2635b480c62b302b610e086b4f48e.zip
* lib/webrick/httputils.rb (WEBrick::HTTPUtils._escape): should
use String#ord to get ascii code from the one-character string. [ruby-dev:28901] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick')
-rw-r--r--lib/webrick/httputils.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb
index e660f0440..c93146997 100644
--- a/lib/webrick/httputils.rb
+++ b/lib/webrick/httputils.rb
@@ -358,7 +358,7 @@ module WEBrick
def _make_regex(str) /([#{Regexp.escape(str)}])/n end
def _make_regex!(str) /([^#{Regexp.escape(str)}])/n end
- def _escape(str, regex) str.gsub(regex){ "%%%02X" % $1[0] } end
+ def _escape(str, regex) str.gsub(regex){ "%%%02X" % $1.ord } end
def _unescape(str, regex) str.gsub(regex){ $1.hex.chr } end
UNESCAPED = _make_regex(control+space+delims+unwise+nonascii)