rspec/rules/S2527/description.adoc
Arseniy Zaostrovnykh 7ca29f686f Force linebreaks
2021-02-02 15:02:10 +01:00

5 lines
467 B
Plaintext

In a Zen-like manner, "NULL" is never equal to anything, even itself. Therefore comparisons using equality operators will always return ``++False++``, even when the value actually ``++IS NULL++``.
For that reason, comparison operators should never be used to make comparisons with ``++NULL++``; ``++IS NULL++`` and ``++IS NOT NULL++`` should be used instead. This extends as well to empty string (""), which is equivalent to ``++NULL++`` for some database engines.