summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-14 17:05:15 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-14 17:05:15 +0000
commit0f0f79d34bed4ef5f2b1055aca6eedfacde60470 (patch)
tree31c26322ae72b38a588539c3a6021c19556b6417 /lib
parent6deeaf6226cc7c4e4e72a7b6d2f38e44da7576f6 (diff)
* 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
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi.rb12
-rw-r--r--lib/irb/init.rb2
-rw-r--r--lib/rdoc/options.rb9
3 files changed, 3 insertions, 20 deletions
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};"
diff --git a/lib/irb/init.rb b/lib/irb/init.rb
index 0fd54ee806..3b455ec582 100644
--- a/lib/irb/init.rb
+++ b/lib/irb/init.rb
@@ -140,8 +140,6 @@ module IRB
when /^-I(.+)?/
opt = $1 || ARGV.shift
load_path.concat(opt.split(File::PATH_SEPARATOR)) if opt
- when /^-K(.)/
- $KCODE = $1
when "--inspect"
@CONF[:INSPECT_MODE] = true
when "--noinspect"
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index bea7e6bdcd..84d92424a3 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -375,14 +375,7 @@ class Options
@css = nil
@webcvs = nil
- @charset = case $KCODE
- when /^S/i
- 'Shift_JIS'
- when /^E/i
- 'EUC-JP'
- else
- 'iso-8859-1'
- end
+ @charset = 'iso-8859-1'
accessors = []