Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 404 Bytes

ambiguous_operator.md

File metadata and controls

17 lines (11 loc) · 404 Bytes

This cop checks for ambiguous operators in the first argument of a method invocation without parentheses.

Example:

# bad

# The `*` is interpreted as a splat operator but it could possibly be
# a `*` method invocation (i.e. `do_something.*(some_array)`).
do_something *some_array

Example:

# good

# With parentheses, there's no ambiguity.
do_something(*some_array)