From: Navindra Umanee Date: 2005-02-28T12:33:35+09:00 Subject: Re: is_defined? Austin Ziegler wrote: > def foo; end > defined?(foo) # => "method" > > Both of the following return "constant." > > class Foo; end > module Bar; end > defined?(Foo) # => "constant" > defined?(Bar) # => "constant" Out of curiosity, why doesn't this work: irb(main):014:0> defined? defined? SyntaxError: compile error (irb):14: syntax error from (irb):14 Cheers, Navin.