Project

General

Profile

Actions

Bug #18739

closed

Wrong mid-rule index

Added by nobu (Nobuyoshi Nakada) about 2 years ago. Updated over 1 year ago.

Status:
Closed
Target version:
-
[ruby-core:108280]

Description

arg in pattern rule in the expr has a wrong index.

diff --git a/parse.y b/parse.y
index d391354beaa..c7ed2edea07 100644
--- a/parse.y
+++ b/parse.y
@@ -1785,7 +1785,7 @@ expr		: command_call
 		  p_top_expr_body
 		    {
 			pop_pvtbl(p, $<tbl>3);
-			p->ctxt.in_kwarg = $<ctxt>1.in_kwarg;
+			p->ctxt.in_kwarg = $<ctxt>2.in_kwarg;
 		    /*%%%*/
 			$$ = NEW_CASE3($1, NEW_IN($4, NEW_TRUE(&@4), NEW_FALSE(&@4), &@4), &@$);
 		    /*% %*/
Actions

Also available in: Atom PDF

Like0
Like0Like0