small medium large xlarge

14 Jun 2010, 14:46
Abder-Rahman Hasan Ali (5 posts)

In page (87), the following is used in the price_must_be_at_least_a_cent method:


What is .nil? used for? Is it just a way to confirm that the value is NOT zero?


17 Jun 2010, 17:59
Sam Ruby (633 posts)

It checks for nil. nil is a different value than zero. In other languages this value is called null. Nil essentially means unassigned or no value.

You must be logged in to comment