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

ruby-changes:9978

From: matz <ko1@a...>
Date: Thu, 15 Jan 2009 14:24:09 +0900 (JST)
Subject: [ruby-changes:9978] Ruby:r21520 (trunk): * parse.y (stmt): explicit error for "Object::Far += foo 1" just

matz	2009-01-15 14:23:51 +0900 (Thu, 15 Jan 2009)

  New Revision: 21520

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

  Log:
    * parse.y (stmt): explicit error for "Object::Far += foo 1" just
      as "Object::Far += 1".

  Modified files:
    trunk/ChangeLog
    trunk/parse.y

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21519)
+++ ChangeLog	(revision 21520)
@@ -1,3 +1,8 @@
+Thu Jan 15 14:17:57 2009  Yukihiro Matsumoto  <matz@r...>
+
+	* parse.y (stmt): explicit error for "Object::Far += foo 1" just
+	  as "Object::Far += 1".
+
 Thu Jan 15 13:10:58 2009  NAKAMURA Usaku  <usa@r...>
 
 	* win32/Makefile.sub (COMPILERFLAG): for enc/trans/gb18030.c.
Index: parse.y
===================================================================
--- parse.y	(revision 21519)
+++ parse.y	(revision 21520)
@@ -1100,6 +1100,11 @@
 			$$ = dispatch3(opassign, $$, $4, $5);
 		    %*/
 		    }
+		| primary_value tCOLON2 tCONSTANT tOP_ASGN command_call
+		    {
+			yyerror("constant re-assignment");
+			$$ = 0;
+		    }
 		| primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call
 		    {
 		    /*%%%*/

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

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