Hi Alban
I don’t think expanding RSPEC-2178 is the right call here. That rule is concerned with short circuiting which does not apply here.
There seems to be not technical advantage to using !=
or ^
. The only difference seems to be personal preference and personal ease of understanding as seen in the comments to answers here.
I personally would change to cognitive complexity to include all three Boolean logical operators and possibly even !=
when comparing booleans as equivalent options should be treated the same.
Best wishes,
Tobias