Skip to content

Commit

Permalink
[ruby/prism] Remove deprecated #child usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton authored and matzbot committed May 3, 2024
1 parent 281df1e commit 97654be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/prism/translation/ripper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1488,16 +1488,16 @@ def visit_constant_path_write_node(node)
# Visit a constant path that is part of a write node.
private def visit_constant_path_write_node_target(node)
if node.parent.nil?
bounds(node.child.location)
child = on_const(node.child.name.to_s)
bounds(node.name_loc)
child = on_const(node.name.to_s)

bounds(node.location)
on_top_const_field(child)
else
parent = visit(node.parent)

bounds(node.child.location)
child = on_const(node.child.name.to_s)
bounds(node.name_loc)
child = on_const(node.name.to_s)

bounds(node.location)
on_const_path_field(parent, child)
Expand Down

0 comments on commit 97654be

Please sign in to comment.