summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2024-05-03 12:02:06 -0400
committergit <svn-admin@ruby-lang.org>2024-05-03 16:02:13 +0000
commit97654bee49c350cc7b49e5237c9263916b1c5722 (patch)
treed14d3b56a3dc27b81058361f97cec783dd037a2a
parent281df1e495eeb8533b963c63a14c614fcab97859 (diff)
[ruby/prism] Remove deprecated #child usage
https://github.com/ruby/prism/commit/14d9b431e2
-rw-r--r--lib/prism/translation/ripper.rb8
1 files 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)