Skip to content

Commit

Permalink
[ruby/prism] Implement next for ripper translation
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton authored and matzbot committed Mar 6, 2024
1 parent a47d0f0 commit c947852
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/prism/translation/ripper.rb
Expand Up @@ -1380,7 +1380,15 @@ def visit_multi_write_node(node)
# next foo
# ^^^^^^^^
def visit_next_node(node)
raise NoMethodError, __method__
if node.arguments.nil?
bounds(node.location)
on_next(on_args_new)
else
arguments = visit_array_node_elements(node.arguments.arguments)

bounds(node.location)
on_next(on_args_add_block(arguments, false))
end
end

# nil
Expand Down

0 comments on commit c947852

Please sign in to comment.