From: Daniel Amelang Date: 2006-01-17T07:52:48+09:00 Subject: Re: const_defined? behavior Hi Nobu, > defined?(IO::SYNC) In my case, the constant's name is stored in a variable. So, I'd have to resort to doing an 'eval' if I were to follow your suggestion. So at least I have two options now: # Option 1 (Nobu's suggestion) found = eval("defined?(obj::#{const})") # Option 2 (My original idea) found = obj.respond_to?(:constants) && obj.constants.member?(const) Any better ideas? I usually try to stay clear of 'eval' if I can. Dan Amelang