From: "nagachika (Tomoyuki Chikanaga)" Date: 2022-09-03T06:18:59+00:00 Subject: [ruby-core:109828] [Ruby master Bug#18739] Wrong mid-rule index Issue #18739 has been updated by nagachika (Tomoyuki Chikanaga). 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. ---------------------------------------- Bug #18739: Wrong mid-rule index https://bugs.ruby-lang.org/issues/18739#change-99066 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Priority: Normal * Assignee: nobu (Nobuyoshi Nakada) * Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE ---------------------------------------- `arg in pattern` rule in the `expr` has a wrong index. ```diff 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, $3); - p->ctxt.in_kwarg = $1.in_kwarg; + p->ctxt.in_kwarg = $2.in_kwarg; /*%%%*/ $$ = NEW_CASE3($1, NEW_IN($4, NEW_TRUE(&@4), NEW_FALSE(&@4), &@4), &@$); /*% %*/ ``` -- https://bugs.ruby-lang.org/ Unsubscribe: