Thursday, March 15, 2007

Every object in Ruby has a Boolean value defaultly

It’s a good idea to get used to the fact that everything in Ruby has a Boolean value, and sometimes it’s not what you may expect.
The Boolean value of almost every object in Ruby is true. The only objects whose Boolean value is false are the objects false and the special non-entity object nil.

No comments: