lib/rubocop/cop/lint/ambiguous_operator.rb in rubocop-0.69.0 vs lib/rubocop/cop/lint/ambiguous_operator.rb in rubocop-0.70.0
- old
+ new
@@ -22,14 +22,14 @@
# do_something(*some_array)
class AmbiguousOperator < Cop
include ParserDiagnostic
AMBIGUITIES = {
- '+' => { actual: 'positive number', possible: 'addition' },
- '-' => { actual: 'negative number', possible: 'subtraction' },
- '*' => { actual: 'splat', possible: 'multiplication' },
- '&' => { actual: 'block', possible: 'binary AND' },
- '**' => { actual: 'keyword splat', possible: 'exponent' }
+ '+' => { actual: 'positive number', possible: 'addition' },
+ '-' => { actual: 'negative number', possible: 'subtraction' },
+ '*' => { actual: 'splat', possible: 'multiplication' },
+ '&' => { actual: 'block', possible: 'binary AND' },
+ '**' => { actual: 'keyword splat', possible: 'exponent' }
}.each do |key, hash|
hash[:operator] = key
end
MSG_FORMAT = 'Ambiguous %<actual>s operator. Parenthesize the method ' \