Sam,

Tuesday, March 6, 2012, 12:09:45 PM, you wrote:

SD> On 07/03/12 07:15, Robert Klemme wrote:
>> You do not want the class but rather the kind of "foo".  "local
>> variable" is not a class.  You can do
>>
>> irb(main):032:0>  class Bogey<  Dance
>> irb(main):033:1>  def bar
>> irb(main):034:2>  a=0
>> irb(main):035:2>  printf "foo ->  %p\n", defined?(foo)
>> irb(main):036:2>  printf "a ->  %p\n", defined?(a)
>> irb(main):037:2>  printf "none ->  %p\n", defined?(none)
>> irb(main):038:2>  end
>> irb(main):039:1>  end
>> =>  nil
>> irb(main):040:0>  Bogey.new.bar
>> foo ->  "method"
>> a ->  "local-variable"
>> none ->  nil
>> =>  nil
SD> Great answer. I'm pretty new to Ruby and assumed that defined? returned 
SD> a boolean. That'll learn me for not reading the manual.

SD> Sam

Indeed, it is a great answer. Thanks Robert!

Now where in online documentation can I find where "defined?" is documented?

I see it explained on page 137 of the Pickaxe book but is there more formal documentation online?

Also ... I find it interesting that I get a syntax error when I do
  defined? defined?