summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-15 05:23:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-15 05:23:51 +0000
commit1fc5fb2b7bc627780c65f88efb81d4da4a35ce24 (patch)
treecc7bf64302bc489a5f1e6f780d7a7319b73021ca
parent994293bc811ddf5def474de86bc64333abad8b7f (diff)
* parse.y (stmt): explicit error for "Object::Far += foo 1" just
as "Object::Far += 1". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--parse.y5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e491ea5c1e..c46f1d4ad1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jan 15 14:17:57 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* win32/Makefile.sub (COMPILERFLAG): for enc/trans/gb18030.c.
diff --git a/parse.y b/parse.y
index 42d24f61dc..2074cb6730 100644
--- a/parse.y
+++ b/parse.y
@@ -1100,6 +1100,11 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem
$$ = 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
{
/*%%%*/