Project

General

Profile

Actions

Bug #18739

closed

Wrong mid-rule index

Added by nobu (Nobuyoshi Nakada) about 2 years ago. Updated almost 2 years 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 #1

Updated by nobu (Nobuyoshi Nakada) about 2 years ago

  • Status changed from Assigned to Closed

Applied in changeset git|08b6aacc1a14440e0f1644a05238559c6c585e38.


Fix the wrong index of the previous component [Bug #18739]

Updated by nagachika (Tomoyuki Chikanaga) almost 2 years ago

  • Backport changed from 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE

ruby_3_1 ffd3d83ea8ccf111061a0f03036e5a093bb03674 merged revision(s) 08b6aacc1a14440e0f1644a05238559c6c585e38.

Actions

Also available in: Atom PDF

Like0
Like0Like0