From: Bertram Scharpf Date: 2005-02-28T17:34:49+09:00 Subject: Re: is_defined? Hi, Am Montag, 28. Feb 2005, 12:33:35 +0900 schrieb Navindra Umanee: > Austin Ziegler wrote: > > def foo; end > > defined?(foo) # => "method" > > Out of curiosity, why doesn't this work: > > irb(main):014:0> defined? defined? > SyntaxError: compile error > (irb):14: syntax error > from (irb):14 `defined?' is an operator, not a method. This is confusing as `Module#method_defined?' and `Module#const_defined?' are methods. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de