[前][次][番号順一覧][スレッド一覧]

ruby-changes:10531

From: usa <ko1@a...>
Date: Fri, 6 Feb 2009 12:05:43 +0900 (JST)
Subject: [ruby-changes:10531] Ruby:r22085 (trunk): * ruby.c (process_options): -K and -E in shebang should be reflect to

usa	2009-02-06 12:05:27 +0900 (Fri, 06 Feb 2009)

  New Revision: 22085

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22085

  Log:
    * ruby.c (process_options): -K and -E in shebang should be reflect to
      default_external. [ruby-dev:37920]

  Modified files:
    trunk/ChangeLog
    trunk/ruby.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 22084)
+++ ChangeLog	(revision 22085)
@@ -1,3 +1,8 @@
+Fri Feb  6 12:03:47 2009  NAKAMURA Usaku  <usa@r...>
+
+	* ruby.c (process_options): -K and -E in shebang should be reflect to
+	  default_external. [ruby-dev:37920]
+
 Fri Feb  6 07:52:57 2009  Tanaka Akira  <akr@f...>
 
 	* ext/pty/pty.c (chfunc): type fixed.
Index: ruby.c
===================================================================
--- ruby.c	(revision 22084)
+++ ruby.c	(revision 22085)
@@ -1296,13 +1296,6 @@
 	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 @@
     }
     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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]