Skip to content

Commit b08573c

Browse files
Earlopainkddnewton
authored andcommitted
[ruby/prism] Fix back reference for ruby_parser on Ruby 2.7
Symbol#name is only a thing since Ruby 3.0 ruby/prism@2de82b15fc
1 parent 6c34880 commit b08573c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/prism/translation/ruby_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def visit_assoc_splat_node(node)
152152
# ^^
153153
# ```
154154
def visit_back_reference_read_node(node)
155-
s(node, :back_ref, node.name.name.delete_prefix("$").to_sym)
155+
s(node, :back_ref, node.name.to_s.delete_prefix("$").to_sym)
156156
end
157157

158158
# ```

0 commit comments

Comments
 (0)