From: 7stud -- Date: 2009-11-15T23:07:28+09:00 Subject: Re: very newbie question duxieweb wrote: > 2009/11/15 Stefano Crocco : > >> >> Because 0 is a true value in ruby, so !queue is false and the body of the if >> expression is not executed. In ruby, the only false values are false and nil. >> > > Oh, that sounds so different from other languages that 0 is a true > value. Whoops. I misinterpreted what your issue was. Yes, ruby is strange that way. In ruby, only nil evaluates to false (and of course false IS false). As a result, everything but nil and false evaluates to true--including 0. -- Posted via http://www.ruby-forum.com/.