summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-24 01:25:22 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-24 01:39:52 +0900
commit4a8ff22f0c9f8a7cd9a68f49523fa2573a4326e9 (patch)
tree592ee65c12d06a02c088616e15c062f5517c4522 /parse.y
parentfb545743932a5efd5a34ed9da981248dae3cc5ff (diff)
Reset paren_nest at tAREF and tASET [Bug #17431]
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index c65a469a316..570a400510e 100644
--- a/parse.y
+++ b/parse.y
@@ -9668,6 +9668,7 @@ parser_yylex(struct parser_params *p)
p->lex.paren_nest++;
if (IS_AFTER_OPERATOR()) {
if ((c = nextc(p)) == ']') {
+ p->lex.paren_nest--;
SET_LEX_STATE(EXPR_ARG);
if ((c = nextc(p)) == '=') {
return tASET;