From 5776f23d692fc92fc81696d1e49767ed1ef88508 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 25 Jan 2008 06:56:50 +0000 Subject: * ruby.c (process_options): set encoding of -e option from -E option if they are compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index c2b0b5cfc5..0573595234 100644 --- a/ruby.c +++ b/ruby.c @@ -1021,6 +1021,9 @@ process_options(VALUE arg) rb_warning("-e conatains non ASCII string, encoding %s is not used", rb_enc_name(enc)); } + else { + eenc = enc; + } rb_enc_associate(opt->e_script, eenc); require_libraries(); tree = rb_parser_compile_string(parser, opt->script, opt->e_script, 1); -- cgit v1.2.3