From: Phlip Date: 2008-08-24T13:31:16+09:00 Subject: Re: Why 'if 0' succeeds in Ruby Charles Oliver Nutter wrote: > * a ||= x would no longer work, since unassigned a (nil) would not > evaluate to false causing x to be assigned. > > * @a ||= x would no longer work > > * a[n] ||= x would no longer work > > * a.b ||= x would no longer work Exactly! a positively-written program should propagate value-objects, and truths, as its booleans express. If you don't like that, then your code should be more positive. Excess examples of 'if nil == q' or 'if false == q' are a sign your program indulges in negativity. So once again, a default Ruby behavior leads to better code style. -- Phlip