summaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-25 06:56:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-25 06:56:50 +0000
commitbb1ee4941dfbbc981b2a98c87e02750328c45d4e (patch)
tree133e85d4eba22d59416f55738ea38fdd7d9c58ca /ruby.c
parent190dd206705dcc5ec16690f9b5782589d58e9ace (diff)
downloadruby-bb1ee4941dfbbc981b2a98c87e02750328c45d4e.tar.gz
ruby-bb1ee4941dfbbc981b2a98c87e02750328c45d4e.tar.xz
ruby-bb1ee4941dfbbc981b2a98c87e02750328c45d4e.zip
* ruby.c (process_options): set encoding of -e option from -E option
if they are compatible. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index c2b0b5cfc..057359523 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);