From: Ian Macdonald Date: 2002-04-26T12:06:15+09:00 Subject: Re: how to check for unitialised class variable? On Fri 26 Apr 2002 at 12:03:28 +0900, Joel VanderWerf wrote: > Ian Macdonald wrote: > > irb(main):008:2> @@foo ||= true > > @@foo = true unless defined? @@foo Thanks Joel and David. I'd already tried something similar, but hadn't got it quite right. Ian -- Ian Macdonald | Admittedly, there are a lot of things that ian@caliban.org | are better than sex, and a lot more that | are worse; but there's nothing quite like | it... |