ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:51196] [Ruby master Bug#19132] `**` を引数に指定すると no anonymous keyword rest parameter になる
@ 2022-11-16  5:15 tommy (Masahiro Tomita)
  2022-11-16 14:16 ` [ruby-dev:51197] " shugo (Shugo Maeda)
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tommy (Masahiro Tomita) @ 2022-11-16  5:15 UTC (permalink / raw)
  To: ruby-dev

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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-17  9:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16  5:15 [ruby-dev:51196] [Ruby master Bug#19132] `**` を引数に指定すると no anonymous keyword rest parameter になる tommy (Masahiro Tomita)
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)

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).