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

ruby-changes:15598

From: mame <ko1@a...>
Date: Tue, 27 Apr 2010 00:09:43 +0900 (JST)
Subject: [ruby-changes:15598] Ruby:r27504 (trunk): * parse.y (program): check void_expr when rb_parse_in_main().

mame	2010-04-27 00:09:26 +0900 (Tue, 27 Apr 2010)

  New Revision: 27504

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

  Log:
    * parse.y (program): check void_expr when rb_parse_in_main().
      [ruby-dev:38717]

  Modified files:
    trunk/ChangeLog
    trunk/parse.y

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27503)
+++ ChangeLog	(revision 27504)
@@ -1,3 +1,8 @@
+Tue Apr 27 00:07:32 2010  Yusuke Endoh  <mame@t...>
+
+	* parse.y (program): check void_expr when rb_parse_in_main().
+	  [ruby-dev:38717]
+
 Mon Apr 26 20:11:05 2010  Tadayoshi Funaba  <tadf@d...>
 
 	* complex.c, rational.c, lib/cmath.rb, lib/date.rb lib/date/delta*:
Index: parse.y
===================================================================
--- parse.y	(revision 27503)
+++ parse.y	(revision 27504)
@@ -786,8 +786,7 @@
 program		:  {
 			lex_state = EXPR_BEG;
 		    /*%%%*/
-			$<num>$ = compile_for_eval || rb_parse_in_main();
-			local_push($<num>$);
+			local_push(compile_for_eval || rb_parse_in_main());
 		    /*%
 			local_push(0);
 		    %*/
@@ -795,7 +794,7 @@
 		  top_compstmt
 		    {
 		    /*%%%*/
-			if ($2 && !$<num>1) {
+			if ($2 && !compile_for_eval) {
 			    /* last expression should not be void */
 			    if (nd_type($2) != NODE_BLOCK) void_expr($2);
 			    else {

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

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