diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-03-05 07:13:38 -0500 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-03-06 16:42:39 +0000 |
| commit | c947852fa884bbbe26a50b50aa36a4342261fbb2 (patch) | |
| tree | 2ee64507c57b7501c03bd9e1fde903b504042e8d /lib | |
| parent | a47d0f03dba40fa2e7f1d564151810058dafbcc1 (diff) | |
[ruby/prism] Implement next for ripper translation
https://github.com/ruby/prism/commit/107ffb64a3
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/prism/translation/ripper.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/prism/translation/ripper.rb b/lib/prism/translation/ripper.rb index d6846ed8b5..4083f57b4b 100644 --- a/lib/prism/translation/ripper.rb +++ b/lib/prism/translation/ripper.rb @@ -1380,7 +1380,15 @@ module Prism # 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 |
