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

ruby-changes:41819

From: nobu <ko1@a...>
Date: Mon, 22 Feb 2016 23:53:56 +0900 (JST)
Subject: [ruby-changes:41819] nobu:r53893 (trunk): ruby.c: remove unnecessary context

nobu	2016-02-22 23:54:31 +0900 (Mon, 22 Feb 2016)

  New Revision: 53893

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

  Log:
    ruby.c: remove unnecessary context
    
    * ruby.c (process_options): remove unnecessary context.
      rb_parser_append_print and rb_parser_while_loop just append some
      nodes and do not depend on the context.

  Modified files:
    trunk/ruby.c
Index: ruby.c
===================================================================
--- ruby.c	(revision 53892)
+++ ruby.c	(revision 53893)
@@ -1629,14 +1629,10 @@ process_options(int argc, char **argv, s https://github.com/ruby/ruby/blob/trunk/ruby.c#L1629
     }
 
     if (opt->do_print) {
-	PREPARE_PARSE_MAIN({
-	    tree = rb_parser_append_print(parser, tree);
-	});
+	tree = rb_parser_append_print(parser, tree);
     }
     if (opt->do_loop) {
-	PREPARE_PARSE_MAIN({
-	    tree = rb_parser_while_loop(parser, tree, opt->do_line, opt->do_split);
-	});
+	tree = rb_parser_while_loop(parser, tree, opt->do_line, opt->do_split);
 	rb_define_global_function("sub", rb_f_sub, -1);
 	rb_define_global_function("gsub", rb_f_gsub, -1);
 	rb_define_global_function("chop", rb_f_chop, 0);

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

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