[ruby/prism] Remove deprecated #child usage

https://github.com/ruby/prism/commit/14d9b431e2
This commit is contained in:
Kevin Newton 2024-05-03 12:02:06 -04:00 коммит произвёл git
Родитель 281df1e495
Коммит 97654bee49
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1488,16 +1488,16 @@ module Prism
# Visit a constant path that is part of a write node. # Visit a constant path that is part of a write node.
private def visit_constant_path_write_node_target(node) private def visit_constant_path_write_node_target(node)
if node.parent.nil? if node.parent.nil?
bounds(node.child.location) bounds(node.name_loc)
child = on_const(node.child.name.to_s) child = on_const(node.name.to_s)
bounds(node.location) bounds(node.location)
on_top_const_field(child) on_top_const_field(child)
else else
parent = visit(node.parent) parent = visit(node.parent)
bounds(node.child.location) bounds(node.name_loc)
child = on_const(node.child.name.to_s) child = on_const(node.name.to_s)
bounds(node.location) bounds(node.location)
on_const_path_field(parent, child) on_const_path_field(parent, child)