Hi,

From: "Brian Candler" <B.Candler / pobox.com>

> How can I make it test that the instance variable is uninitialised, so I can
> prevent a warning? 

I think defined? might do the trick:

>> class Foo
>>   def initialize
>>     p defined? @bar
>>     @bar = 123
>>     p defined? @bar
>>   end
>> end
=> nil
>> Foo.new
nil                   # the result of the 1st defined? test
"instance-variable"   # the result of the 2nd
=> #<Foo:0x2ab9b70 @bar=123>


HTH,

Bill