Skip to content

Commit 107ffb6

Browse files
committed
Implement next for ripper translation
1 parent 93d0643 commit 107ffb6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/prism/translation/ripper.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,15 @@ def visit_multi_write_node(node)
13801380
# next foo
13811381
# ^^^^^^^^
13821382
def visit_next_node(node)
1383-
raise NoMethodError, __method__
1383+
if node.arguments.nil?
1384+
bounds(node.location)
1385+
on_next(on_args_new)
1386+
else
1387+
arguments = visit_array_node_elements(node.arguments.arguments)
1388+
1389+
bounds(node.location)
1390+
on_next(on_args_add_block(arguments, false))
1391+
end
13841392
end
13851393

13861394
# nil

0 commit comments

Comments
 (0)