News for hackers. Stuff that matters.
Re:Don't overload #nil? in Ruby by jbert on Thursday November 10, 2011 @02:27AM (#3219300)
By the same argument, nil != true.

This could lead to a tri-state ifs (with true/false/nil branches).

Or you can just consider that 2-branch 'if' runs the first branch if the test expr is true and the second 'otherwise'. (So that doesn't make nil false, it just makes it non-true).

And then your interpretation and everyone else co-exists and we can all code together.

There are no comments on this comment yet.