Excerpts from Arup R.'s message of 2014-01-29 15:52:43 +0100:
if I understand this Animal.respond_to?(:bark) # => false, I can’t
understand Object.respond_to?(:foo) # => true .
Because everything in ruby is an instance of Object, including instances
of class Class
(that is, including classes). Since your foo method is an instance
Object, it can be called on everything. You can check this by calling:
won’t raise exceptions.
I hope this helps
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.