Hi,

Am Montag, 28. Feb 2005, 12:33:35 +0900 schrieb Navindra Umanee:
> Austin Ziegler <halostatue / gmail.com> 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