[ruby/prism] Update lib/prism/translation/parser/compiler.rb

https://github.com/ruby/prism/commit/dccfd83bc4
This commit is contained in:
Kevin Newton 2024-03-04 11:20:55 -05:00 committed by git
parent a03f92923b
commit 85fe8b6b9c

View File

@ -255,7 +255,7 @@ module Prism
when :!
return visit_block(builder.not_op(token(node.message_loc), token(node.opening_loc), visit(node.receiver), token(node.closing_loc)), block)
when :=~
if (receiver = node.receiver).type == :regular_expression_node
if (receiver = node.receiver).is_a?(RegularExpressionNode)
return builder.match_op(visit(receiver), token(node.message_loc), visit(node.arguments.arguments.first))
end
when :[]