[ruby/prism] Fix back reference for ruby_parser on Ruby 2.7

Symbol#name is only a thing since Ruby 3.0

https://github.com/ruby/prism/commit/2de82b15fc
This commit is contained in:
Earlopain 2025-09-14 11:43:34 +02:00 committed by Kevin Newton
parent 6c34880111
commit b08573c815

View File

@ -152,7 +152,7 @@ module Prism
# ^^
# ```
def visit_back_reference_read_node(node)
s(node, :back_ref, node.name.name.delete_prefix("$").to_sym)
s(node, :back_ref, node.name.to_s.delete_prefix("$").to_sym)
end
# ```