&&
operator to compare multiple values.14
15# Raises "multiple comparison detected"
16x < y < z
1710 <= x <= 2018
19# Raises "empty rescue block detected"
20begin
&&
operator to compare multiple values.13end while a == b
14
15# Raises "multiple comparison detected"
16x < y < z1710 <= x <= 20
18
19# Raises "empty rescue block detected"
In math and Python, we can use x < y < z
style comparison to compare multiple value.
However, we can't use the comparison in Ruby. However, the comparison is not syntax error.
This cop checks the bad usage of comparison operators.
x < y < z
x < y && y < z