From: "nobu (Nobuyoshi Nakada)" <noreply@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:108280] [Ruby master Bug#18739] Wrong mid-rule index
Date: Mon, 18 Apr 2022 09:36:40 +0000 (UTC) [thread overview]
Message-ID: <redmine.issue-18739.20220418093639.4@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-18739.20220418093639.4@ruby-lang.org
Issue #18739 has been reported by nobu (Nobuyoshi Nakada).
----------------------------------------
Bug #18739: Wrong mid-rule index
https://bugs.ruby-lang.org/issues/18739
* Author: nobu (Nobuyoshi Nakada)
* Status: Assigned
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED
----------------------------------------
`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, $<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), &@$);
/*% %*/
```
--
https://bugs.ruby-lang.org/
next parent reply other threads:[~2022-04-18 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 9:36 nobu (Nobuyoshi Nakada) [this message]
2022-09-03 6:18 ` [ruby-core:109828] [Ruby master Bug#18739] Wrong mid-rule index nagachika (Tomoyuki Chikanaga)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.issue-18739.20220418093639.4@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).