From: Renald Buter Date: 2005-06-17T17:48:10+09:00 Subject: Re: Unless unless On 17:44 Fri 17 Jun , G?bor SEBESTY?N wrote: > I have this very simple example: > > a = 1 > b = nil > puts a.nil? > puts b.nil? > puts "ok" unless a.nil? and b.nil? > > Running it results these: > > false > true > ok > > Why the third answer is ok? Unless false and true => false .. Just look carefully and mind that 'unless' is equivalent to 'if not' a.nil? => false b.nil? => true false and true => false if not false => if true Regards, Renald