From 97654bee49c350cc7b49e5237c9263916b1c5722 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Fri, 3 May 2024 12:02:06 -0400 Subject: [PATCH] [ruby/prism] Remove deprecated #child usage https://github.com/ruby/prism/commit/14d9b431e2 --- lib/prism/translation/ripper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/prism/translation/ripper.rb b/lib/prism/translation/ripper.rb index 5cb6f6715d..d226bb58df 100644 --- a/lib/prism/translation/ripper.rb +++ b/lib/prism/translation/ripper.rb @@ -1488,16 +1488,16 @@ module Prism # 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)