Skip to content

Files

Latest commit

 

History

History
28 lines (19 loc) · 713 Bytes

Lint-AmbiguousOperator.md

File metadata and controls

28 lines (19 loc) · 713 Bytes

Pattern: Ambiguous operator

Issue: -

Description

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

Examples

# 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
# good

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

Further Reading