Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Prism::Translation::RubyParser::Compiler#visit_pattern_constant
visit_pattern_constant(node)
lib/prism/translation/ruby_parser.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/prism/translation/ruby_parser.rb, line 1576
def visit_pattern_constant(node)
case node
when nil
# nothing
when ConstantReadNode
visit(node)
else
s(node, :const, visit(node))
end
end
Pattern constants get wrapped in another layer of :const.