From: Vl Online Date: 2008-09-01T23:58:54+09:00 Subject: Re: Checking for 'nil' Class (not instance) variables? > irb(main):031:0> @nosuchvar.nil? > => true > irb(main):032:0> @@nosuchvar.nil? > NameError: uninitialized class variable @@nosuchvar in Object > from (irb):32 > irb(main):033:0> Well, to query about class variables/methods, I would prefer to use class methods. use self.class to get the class object of current instance, then query the class variables of this class using class_variable_defined? method. irb(main):026:0> self.class.class_variable_defined? :@@nosuchvar => false -- Posted via http://www.ruby-forum.com/.