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

ruby-changes:9039

From: nobu <ko1@a...>
Date: Mon, 8 Dec 2008 11:15:53 +0900 (JST)
Subject: [ruby-changes:9039] Ruby:r20576 (trunk): * ruby.c (proc_options): source-encoding option.

nobu	2008-12-08 11:15:47 +0900 (Mon, 08 Dec 2008)

  New Revision: 20576

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

  Log:
    * ruby.c (proc_options): source-encoding option.

  Modified files:
    trunk/ruby.c

Index: ruby.c
===================================================================
--- ruby.c	(revision 20575)
+++ ruby.c	(revision 20576)
@@ -960,6 +960,10 @@
 		    if (!*(s = ++p)) break;
 		    set_encoding_part(internal);
 		    if (!*(s = ++p)) break;
+#if ALLOW_DEFAULT_SOURCE_ENCODING
+		    set_encoding_part(source);
+		    if (!*(s = ++p)) break;
+#endif
 		    rb_raise(rb_eRuntimeError, "extra argument for %s: %s",
 			     (arg[1] == '-' ? "--encoding" : "-E"), s);
 #	undef set_encoding_part
@@ -971,6 +975,11 @@
 	    else if (is_option_with_arg("external-encoding", Qfalse, Qtrue)) {
 		set_external_encoding_once(opt, s, 0);
 	    }
+#if ALLOW_DEFAULT_SOURCE_ENCODING
+	    else if (is_option_with_arg("source-encoding", Qfalse, Qtrue)) {
+		set_source_encoding_once(opt, s, 0);
+	    }
+#endif
 	    else if (strcmp("version", s) == 0) {
 		if (envopt) goto noenvopt_long;
 		opt->version = 1;

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

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