diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 09:48:05 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 09:48:05 +0000 |
| commit | a2ee5023c56b247c640b0a6c6002b74c8c04f631 (patch) | |
| tree | 15b5d0c3c9383bd86581cc27a6de7cdd36306495 /ruby.c | |
| parent | c1c2a8d4c8a5136cbf4abb350b060ffdf48c982a (diff) | |
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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@22516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
| -rw-r--r-- | ruby.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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); |
