From: "tommy (Masahiro Tomita)" <noreply@ruby-lang.org>
To: ruby-dev@neon.ruby-lang.org
Subject: [ruby-dev:51196] [Ruby master Bug#19132] `**` を引数に指定すると no anonymous keyword rest parameter になる
Date: Wed, 16 Nov 2022 05:15:21 +0000 (UTC) [thread overview]
Message-ID: <redmine.issue-19132.20221116051519.82@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-19132.20221116051519.82@ruby-lang.org>
Issue #19132 has been reported by tommy (Masahiro Tomita).
----------------------------------------
Bug #19132: `**` を引数に指定すると no anonymous keyword rest parameter になる
https://bugs.ruby-lang.org/issues/19132
* Author: tommy (Masahiro Tomita)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.2.0preview3 (2022-11-14) [arm64-darwin21]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
Ruby 3.2.0-preview3 で次のスクリプトを実行するとエラーになります。
```ruby
def hoge(a, *, k: nil, **)
foo(*, **)
end
```
```
% ruby hoge.rb
hoge.rb:2: no anonymous keyword rest parameter
```
次のようにキーワードパラメータが `**` だけであればエラーになりませんでした。
```ruby
def hoge(a, *, **)
foo(*, **)
end
```
--
https://bugs.ruby-lang.org/
next parent reply other threads:[~2022-11-16 5:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 5:15 tommy (Masahiro Tomita) [this message]
2022-11-16 14:16 ` [ruby-dev:51197] " shugo (Shugo Maeda)
2022-11-16 23:03 ` [ruby-dev:51198] " shugo (Shugo Maeda)
2022-11-17 3:23 ` [ruby-dev:51199] " nobu (Nobuyoshi Nakada)
2022-11-17 3:32 ` [ruby-dev:51200] " shugo (Shugo Maeda)
2022-11-17 8:52 ` [ruby-dev:51201] " shugo (Shugo Maeda)
2022-11-17 9:09 ` [ruby-dev:51202] " yui-knk (Kaneko Yuichiro)
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-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.issue-19132.20221116051519.82@ruby-lang.org \
--to=noreply@ruby-lang.org \
--cc=ruby-dev@neon.ruby-lang.org \
--cc=ruby-dev@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 NNTP newsgroup(s).