Hi --

On Sun, 30 Jan 2005, E S wrote:

> If method_missing handles 'foo', then the object responds to 'foo'.

That's true in an informal sense, but it doesn't capture the practical
relation between #respond_to? and #method_missing -- which is that
#method_missing is what happens to messages that don't correspond to
what the object #respond[s]_to?  In other words, one can say that an
object responds to every message, and that no method is truly missing,
but that isn't the whole story of the #respond_to?/#method_missing
mechanisms.

I think it's better to think of it as: an object responds to a certain
set of messages, and if it's sent a message it doesn't respond to,
that's considered an exceptional condition which can be trapped either
with a rescue clause or with the special #method_missing method.


David

-- 
David A. Black
dblack / wobblini.net