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

ruby-changes:42670

From: nobu <ko1@a...>
Date: Sun, 24 Apr 2016 11:45:50 +0900 (JST)
Subject: [ruby-changes:42670] nobu:r54744 (trunk): Revert r54742

nobu	2016-04-24 12:42:25 +0900 (Sun, 24 Apr 2016)

  New Revision: 54744

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54744

  Log:
    Revert r54742
    
    Commit miss.

  Modified files:
    trunk/ruby.c
Index: ruby.c
===================================================================
--- ruby.c	(revision 54743)
+++ ruby.c	(revision 54744)
@@ -1413,10 +1413,7 @@ process_options(int argc, char **argv, s https://github.com/ruby/ruby/blob/trunk/ruby.c#L1413
     NODE *tree = 0;
     VALUE parser;
     const rb_iseq_t *iseq;
-    rb_encoding *enc, *lenc, *ienc = 0;
-#if UTF8_PATH
-    rb_encoding *uenc;
-#endif
+    rb_encoding *enc, *lenc;
     const char *s;
     char fbuf[MAXPATHLEN];
     int i = (int)proc_options(argc, argv, opt, 0);
@@ -1528,7 +1525,6 @@ process_options(int argc, char **argv, s https://github.com/ruby/ruby/blob/trunk/ruby.c#L1525
 	enc = rb_enc_from_index(opt->intern.enc.index);
 	rb_enc_set_default_internal(rb_enc_from_encoding(enc));
 	opt->intern.enc.index = -1;
-	ienc = enc;
     }
     rb_enc_associate(opt->script_name, lenc);
     rb_obj_freeze(opt->script_name);
@@ -1563,8 +1559,7 @@ process_options(int argc, char **argv, s https://github.com/ruby/ruby/blob/trunk/ruby.c#L1559
 #undef SET_COMPILE_OPTION
     }
 #if UTF8_PATH
-    uenc = rb_utf8_encoding();
-    opt->script_name = str_conv_enc(opt->script_name, uenc, lenc);
+    opt->script_name = str_conv_enc(opt->script_name, rb_utf8_encoding(), lenc);
     opt->script = RSTRING_PTR(opt->script_name);
 #endif
     ruby_set_argv(argc, argv);
@@ -1582,13 +1577,8 @@ process_options(int argc, char **argv, s https://github.com/ruby/ruby/blob/trunk/ruby.c#L1577
 	    eenc = rb_enc_from_index(opt->src.enc.index);
 	}
 	else {
-	    eenc = ienc ? ienc : lenc;
+	    eenc = lenc;
 	}
-#if UTF8_PATH
-	if (eenc != uenc)
-	    opt->e_script = str_conv_enc(opt->e_script, uenc, eenc);
-	else
-#endif
 	rb_enc_associate(opt->e_script, eenc);
 	if (!(opt->dump & ~DUMP_BIT(version_v))) {
 	    ruby_set_script_name(opt->script_name);

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

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