class RuboCop::Cop::Lint::AmbiguousOperator
do_something(*some_array)
# With parentheses, there’s no ambiguity.
# good
@example
do_something *some_array
# a ‘*` method invocation (i.e. `do_something.*(some_array)`).
# The `*` is interpreted as a splat operator but it could possibly be
# bad
@example
method invocation without parentheses.
This cop checks for ambiguous operators in the first argument of a
def alternative_message(diagnostic)
def alternative_message(diagnostic) operator = diagnostic.location.source hash = AMBIGUITIES[operator] format(MSG_FORMAT, hash) end
def relevant_diagnostic?(diagnostic)
def relevant_diagnostic?(diagnostic) diagnostic.reason == :ambiguous_prefix end