diff --git a/lib/rubocop/cop/performance/redundant_match.rb b/lib/rubocop/cop/performance/redundant_match.rb index a4dc15b56..d5d2c4cb1 100644 --- a/lib/rubocop/cop/performance/redundant_match.rb +++ b/lib/rubocop/cop/performance/redundant_match.rb @@ -72,7 +72,7 @@ def replacement(node) def requires_parentheses?(arg) return true if arg.if_type? && arg.ternary? - return true if arg.and_type? || arg.or_type? || arg.range_type? + return true if arg.operator_keyword? || arg.range_type? call_like?(arg) && requires_parentheses_for_call_like?(arg) end