In a Zen-like manner, ``++NaN++`` isn't equal to anything, even itself. So comparisons (``++>, <, >=, <=++``) where one operand is ``++NaN++`` or evaluates to ``++NaN++`` always return ``++false++``. Specifically, ``++undefined++`` and objects that cannot be converted to numbers evaluate to ``++NaN++`` when used in numerical comparisons.
This rule raises an issue when there is at least one path through the code where one of the operands to a comparison is ``++NaN++``, ``++undefined++`` or an ``++Object++`` which cannot be converted to a number.
=== on 18 Oct 2016, 10:54:41 Pierre-Yves Nicolas wrote:
Similarly to RSPEC-3757, we may raise a false positive if the object has a ``++valueOf++`` method (which is the case for ``++Date++`` which we already exclude). We will refine that if the currently described behavior raises too many false positives.