Avoid the use of the case equality operator
===
. 1if 1 > 2 and 2 < 3
2end
3
4(1..100) === 7 5
6hash = {}
7hash.merge!(key: value)
Description
Explicit use of the case equality operator === should be avoided. As its name implies it is meant to be used implicitly by case expressions and outside of them it yields some pretty confusing code.
Bad practice
Array === something
(1..100) === 7
/something/ === some_string
Recommended
something.is_a?(Array)
(1..100).include?(7)
some_string.match?(/something/)