From c947852fa884bbbe26a50b50aa36a4342261fbb2 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Tue, 5 Mar 2024 07:13:38 -0500 Subject: [PATCH] [ruby/prism] Implement next for ripper translation https://github.com/ruby/prism/commit/107ffb64a3 --- lib/prism/translation/ripper.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/prism/translation/ripper.rb b/lib/prism/translation/ripper.rb index d6846ed8b571b5..4083f57b4be242 100644 --- a/lib/prism/translation/ripper.rb +++ b/lib/prism/translation/ripper.rb @@ -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