Pat Maddox wrote:
> Take this class:
> 
> class Foo
>   def method_missing(m, *args)
>     m.to_s
>   end
> end
> 
> irb(main):006:0> Foo.new.foo
> => "foo"
> irb(main):007:0> Foo.respond_to? :foo
> => false
> 
> This obviously just returns the name of any method that doesn't exist
> for the object.  So if you can send the object any message and get a
> result, why doesn't it respond_to those messages?
> 
> Pat

The respond_to method can't know what method_missing is doing with 
missing methods, so it's the up to the class author to provide a version 
of respond_to that agrees with method_missing.

-- 
Posted via http://www.ruby-forum.com/.