From 4709e330cf23e91157da30c58e33017d1ff4433e Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 16 Oct 2008 22:21:09 +0000 Subject: * ruby.c (proc_options): no warning when default_external already set by -E. * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_rubyopt): put -K after -E to set script encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index edce4777bc..881ebe7fb2 100644 --- a/ruby.c +++ b/ruby.c @@ -814,7 +814,8 @@ proc_options(int argc, char **argv, struct cmdline_options *opt) } if (enc_name) { opt->src.enc.name = rb_str_new2(enc_name); - set_external_encoding_once(opt, enc_name, 0); + if (!opt->ext.enc.name) + opt->ext.enc.name = opt->src.enc.name; } s++; } -- cgit v1.2.3