Hacker News new | past | comments | ask | show | jobs | submit login

null or false, actually.



Slip of the tongue. ;) But the easiest way to think about it is something like:

  type(x) == Boolean ? x == True : x != nil
Disclaimer: That may not be valid Ruby, as I only have a passing knowledge of some bits of Ruby.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: