Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bbdba3f

Browse files
noahgibbskddnewton
andcommittedFeb 8, 2024
Add Kevin's visit_all change and change the parent class to Compiler.
Co-Authored-By: Kevin Newton <kddnewton@gmail.com>
1 parent 03addf2 commit bbdba3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/prism/ripper_compat.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Prism
1717
#
1818
# To use this class, you treat `Prism::RipperCompat` effectively as you would
1919
# treat the `Ripper` class.
20-
class RipperCompat < Visitor
20+
class RipperCompat < Compiler
2121
# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that
2222
# returns the arrays of [type, *children].
2323
class SexpBuilder < RipperCompat
@@ -194,7 +194,7 @@ def visit_block_parameters_node(node)
194194
# This will require expanding as we support more kinds of parameters.
195195
def visit_parameters_node(node)
196196
#on_params(required, optional, nil, nil, nil, nil, nil)
197-
on_params(node.requireds.map { |n| visit(n) }, nil, nil, nil, nil, nil, nil)
197+
on_params(visit_all(node.requireds), nil, nil, nil, nil, nil, nil)
198198
end
199199

200200
# Visit a RequiredParameterNode.

0 commit comments

Comments
 (0)
Please sign in to comment.