summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-06 03:05:27 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-06 03:05:27 +0000
commit5067bfe36ee11c7cf601df7e2bab3ed5f3b01e4e (patch)
treeac92a8810c45f1f5eb5c91635efd69179588560d /ruby.c
parent1bd6111488e56948a221e9f8c81f7ad286ccbff1 (diff)
* ruby.c (process_options): -K and -E in shebang should be reflect to
default_external. [ruby-dev:37920] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ruby.c b/ruby.c
index 99852afdbd..16cf652b5e 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1296,13 +1296,6 @@ process_options(VALUE arg)
opt->src.enc.index = opt_enc_index(opt->src.enc.name);
src_encoding_index = opt->src.enc.index;
}
- if (opt->ext.enc.index >= 0) {
- enc = rb_enc_from_index(opt->ext.enc.index);
- }
- else {
- enc = lenc;
- }
- rb_enc_set_default_external(rb_enc_from_encoding(enc));
if (opt->intern.enc.index >= 0) {
enc = rb_enc_from_index(opt->intern.enc.index);
rb_enc_set_default_internal(rb_enc_from_encoding(enc));
@@ -1363,6 +1356,13 @@ process_options(VALUE arg)
}
if (opt->dump & DUMP_BIT(yydebug)) return Qtrue;
+ if (opt->ext.enc.index >= 0) {
+ enc = rb_enc_from_index(opt->ext.enc.index);
+ }
+ else {
+ enc = lenc;
+ }
+ rb_enc_set_default_external(rb_enc_from_encoding(enc));
if (opt->intern.enc.index >= 0) {
/* Set in the shebang line */
enc = rb_enc_from_index(opt->intern.enc.index);