summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-11-28 15:49:04 -0500
committergit <svn-admin@ruby-lang.org>2023-11-28 22:33:50 +0000
commit49383901772f874569bbdc992867bd02b4b597a8 (patch)
treeabd79930a7511b6504a6314f4aab6a0869d86e66 /test/ruby
parentea3e17e430b74b4e58535a707319025e008cc123 (diff)
[ruby/prism] Implicit rest nodes
Fundamentally, `foo { |bar,| }` is different from `foo { |bar, *| }` because of arity checks. This PR introduces a new node to handle that, `ImplicitRestNode`, which goes in the `rest` slot of parameter nodes instead of `RestParameterNode` instances. This is also used in a couple of other places, namely: * pattern matching: `foo in [bar,]` * multi target: `for foo, in bar do end` * multi write: `foo, = bar` Now the only splat nodes with a `NULL` value are when you're forwarding, as in: `def foo(*) = bar(*)`. https://github.com/ruby/prism/commit/dba2a3b652
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions