[ruby/prism] Fix my RipperCompat logic mistake from expansion for steep flow analysis

https://github.com/ruby/prism/commit/f71a390c12
This commit is contained in:
Gopal Patel 2024-01-08 22:25:29 -08:00 committed by git
parent 935d4fab62
commit ca8a626586

View File

@ -109,7 +109,7 @@ module Prism
# Visit a CallNode node.
def visit_call_node(node)
message = node.message
if message && message.match?(/^[[:alpha:]_]/) && node.opening_loc.nil? && node.arguments && node.arguments.arguments && node.arguments.arguments.length == 1
if message && !message.match?(/^[[:alpha:]_]/) && node.opening_loc.nil? && node.arguments && node.arguments.arguments && node.arguments.arguments.length == 1
left = visit(node.receiver)
right = visit(node.arguments.arguments.first)