diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-25 06:56:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-25 06:56:50 +0000 |
commit | 5776f23d692fc92fc81696d1e49767ed1ef88508 (patch) | |
tree | 133e85d4eba22d59416f55738ea38fdd7d9c58ca | |
parent | c30d2489dda69650d084e9e16bfdd94653d763d9 (diff) |
* 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
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | ruby.c | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ -Fri Jan 25 15:41:20 2008 Nobuyoshi Nakada <[email protected]> +Fri Jan 25 15:56:48 2008 Nobuyoshi Nakada <[email protected]> * ruby.c (cmdline_arguments): split argc and argv from cmdline_options. @@ -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); |