summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-11 02:09:00 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-11 15:22:16 +0900
commit140b8117bd3c32cb9d0b144937b90f0178a00b0e (patch)
tree6465f881f123b2e8243d18b7630d010d2ba71654 /parse.y
parent42ac8890efbd38dc021bf5edab325a69be7fc4cf (diff)
&. is not allowed inside LHS of massign
https://hackerone.com/reports/605262
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 6fc098bc6e..bf6c726024 100644
--- a/parse.y
+++ b/parse.y
@@ -1787,6 +1787,9 @@ mlhs_node : user_variable
}
| primary_value call_op tIDENTIFIER
{
+ if ($2 == tANDDOT) {
+ yyerror1(&@2, "&. inside LHS of multiple assignment");
+ }
/*%%%*/
$$ = attrset(p, $1, $2, $3, &@$);
/*% %*/
@@ -1801,6 +1804,9 @@ mlhs_node : user_variable
}
| primary_value call_op tCONSTANT
{
+ if ($2 == tANDDOT) {
+ yyerror1(&@2, "&. inside LHS of multiple assignment");
+ }
/*%%%*/
$$ = attrset(p, $1, $2, $3, &@$);
/*% %*/