From: Brian Candler Date: 2003-02-18T22:02:15+09:00 Subject: Re: How to test for existence of instance variable? > B> I want to check whether the instance variable corresponding to that > B> attribute is already initialised. > > First test if the instance variable exist. That was essentially what I was asking. What is the way to check if an instance variable exists, when its name is dynamic? Preferably not something incredibly inefficient like obj.instance_eval "defined? @#{newmember}" (since all I'm trying to do is avoid a warning). Regards, Brian.