rspec/rules/S1440/description.adoc

4 lines
287 B
Plaintext
Raw Normal View History

2021-01-27 13:42:22 +01:00
The ``++==++`` and ``++!=++`` operators do type coercion before comparing values. This is bad because it can mask type errors. For example, it evaluates ``++' \t\r\n' == 0++`` as ``++true++``.
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
It is best to always use the side-effect-less ``++===++`` and ``++!==++`` operators instead.