Actions
Bug #21031
closedIncompatibility with prism and parse.y when eval'ing unnamed forwarding variables
Bug #21031:
Incompatibility with prism and parse.y when eval'ing unnamed forwarding variables
ruby -v:
ruby 3.5.0dev (2025-01-13T03:12:28Z master 384e6945ac) +PRISM [arm64-darwin23]
Description
Case 1¶
$ ruby --parser=prism t.rb
t.rb:4:in 'Kernel#eval': (eval at t.rb:4):1: syntax error found (SyntaxError)
> 1 | p(*)
| ^ unexpected `*`; no anonymous rest parameter
from t.rb:4:in 'Object#foo'
from t.rb:7:in '<main>'
Case 2¶
$ ruby --parser=prism t.rb
t.rb:4:in 'Kernel#eval': (eval at t.rb:4):1: syntax error found (SyntaxError)
> 1 | p(**)
| ^~ unexpected `**`; no anonymous keyword rest parameter
from t.rb:4:in 'Object#foo'
from t.rb:7:in '<main>'
Case 3¶
$ ruby --parser=prism t.rb
t.rb:4:in 'Kernel#eval': (eval at t.rb:4):1: syntax error found (SyntaxError)
> 1 | p(&)
| ^ unexpected `&`; no anonymous block parameter
from t.rb:4:in 'Object#foo'
from t.rb:7:in '<main>'
Case 4¶
$ ruby --parser=prism t.rb
t.rb:4:in 'Kernel#eval': (eval at t.rb:4):1: syntax error found (SyntaxError)
> 1 | p(...)
| ^~~ unexpected ... when the parent method is not forwarding
from t.rb:4:in 'Object#foo'
from t.rb:7:in '<main>'
I expect to the parse.y behavior.
Actions