From: Robert Klemme Date: 2005-01-18T01:11:10+09:00 Subject: Re: is defined? fast? "George Moschovitis" schrieb im Newsbeitrag news:1105968115.995603.227690@f14g2000cwb.googlegroups.com... > Hello everyone, I have a simple question: > > is 'if defined?(MyFlag)' as fast as 'if $my_flag' > or is it much slower? > > Any information will be appreciated. You cannot compare them as both have different functionality: defined? checks whether a var is defined while the other test uses the var value. I think there is a wiki page about this but I cannot find it at the moment. The wiki is here: http://www.rubygarden.org/ruby Regards robert