From: Patrick Hurley Date: 2006-02-21T00:37:50+09:00 Subject: Re: [/QUIZ] metakoans.rb (#67) On 2/20/06, George Ogata wrote: > ... is a better solution. So is using `defined?' > instead of `instance_variables.include?'. The problem with defined? is that it will only work in an eval context, that is if you use a block with define_method (which I personally prefer), then defined?(str_rep_of_var) is always an expression, so you need to use the instance_variables.include? Of course if someone has a trick (beyond eval("defined? #{ivar}") I am interested.