In C, 0 is false and any other numeric value is true. Ruby[footnote] Built with C, mind you.[/footnote] bucks that trend, and says “Nil and false are false, everything else is true, including 0.”
And while we’re at it, let’s cover
each: the looping construct in Ruby. Some people are familiar with
for from elsewhere, but
for in Ruby is defined in terms of
each, so why go that extra step? Also,
each introduces its own scope, whereas
for tags on to the current one.