From: Hal Fulton Date: 2004-05-19T12:48:25+09:00 Subject: Re: Zero is true ... whoda thunk? David Naseby wrote: >>-----Original Message----- >>From: David Naseby [mailto:david.naseby@eonesolutions.com.au] >> >>>Got milk? >>> >>>What's your answer, yes or no? >>> >>>No, of course. >> >>I'd prefer to encode this as: >> >> if got_milk? ... end >> >>where >> >> def got_milk? >> @milk_volume.zero? > > > Bugger. I mean !@milk_volume.zero? of course. So this whole problem could > be avoided by making 0==false, thus proving your point. THIS is why I don't > post normally.... Haha... well, the got-milk logic would mean that negative numbers would also be false, right? "I've got -5 gallons of milk. Give me 5 gallons, and I still won't have any!" Now you've got me thinking about the Mad Hatter's tea party... Hal