Skip to content

Commit 14d9b43

Browse files
committed
Remove deprecated #child usage
1 parent 4895536 commit 14d9b43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/prism/translation/ripper.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,16 +1488,16 @@ def visit_constant_path_write_node(node)
14881488
# Visit a constant path that is part of a write node.
14891489
private def visit_constant_path_write_node_target(node)
14901490
if node.parent.nil?
1491-
bounds(node.child.location)
1492-
child = on_const(node.child.name.to_s)
1491+
bounds(node.name_loc)
1492+
child = on_const(node.name.to_s)
14931493

14941494
bounds(node.location)
14951495
on_top_const_field(child)
14961496
else
14971497
parent = visit(node.parent)
14981498

1499-
bounds(node.child.location)
1500-
child = on_const(node.child.name.to_s)
1499+
bounds(node.name_loc)
1500+
child = on_const(node.name.to_s)
15011501

15021502
bounds(node.location)
15031503
on_const_path_field(parent, child)

0 commit comments

Comments
 (0)