From 0f0f79d34bed4ef5f2b1055aca6eedfacde60470 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 14 Dec 2007 17:05:15 +0000 Subject: * lib/rdoc/options.rb (Options::parse): do not access $KCODE any longer. [ruby-core:14079] * lib/irb/init.rb (IRB::IRB.parse_opts): ditto. * lib/cgi.rb (CGI::CGI): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cgi.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib/cgi.rb') diff --git a/lib/cgi.rb b/lib/cgi.rb index fad6d3f468..9af4c9cf24 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -378,21 +378,13 @@ class CGI if Integer($1) < 256 Integer($1).chr else - if Integer($1) < 65536 and ($KCODE[0] == ?u or $KCODE[0] == ?U) - [Integer($1)].pack("U") - else - "&##{$1};" - end + "&##{$1};" end when /\A#x([0-9a-f]+)\z/ni then if $1.hex < 256 $1.hex.chr else - if $1.hex < 65536 and ($KCODE[0] == ?u or $KCODE[0] == ?U) - [$1.hex].pack("U") - else - "&#x#{$1};" - end + "&#x#{$1};" end else "&#{match};" -- cgit v1.2.3