xxxxxxxxxx
In Ruby, there are exactly two values which are considered "falsy",
and will return false when tested as a condition for an if expression:
- nil
- boolean false
All other values are considered "truthy", including:
0 - numeric zero (Integer or otherwise)
"" - Empty strings
"\n" - Strings containing only whitespace
[] - Empty arrays
{} - Empty hashes