From 051558c92ff85b0f210a830291b9a2ad9f930387 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 22 Feb 2009 09:48:05 +0000 Subject: merges r22085 from trunk into ruby_1_9_1. * 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/branches/ruby_1_9_1@22516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index cfefc04fa4..3d405f228e 100644 --- a/ruby.c +++ b/ruby.c @@ -1289,13 +1289,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)); @@ -1355,6 +1348,13 @@ process_options(VALUE arg) }); } + 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); -- cgit v1.2.3