On 9/20/06, MonkeeSage <MonkeeSage / gmail.com> wrote:
> Of course, respond_to? doesn't tell you about what the method does. But
> it isn't meant to. To check an object's signature is not the same thing
> as to check that it does what you want it to do. A file object that
> responds to write() may output a file in the current working directory;
> but a mock object which is _acting like_ a file object may just write
> to screen, or may not write anything at all. But at least you can tell
> that it _acts like_ a file object so far as its signature is concerned
> (viz., duck typing).

Not without doing more than #respond_to? checking. See other responses
that I've made.

-austin
P.S. Please don't snip context when you're posting a response to
someone. Just because you might be using a threaded newsreader or
mailer doesn't mean that everyone is. A little context goes a long
way.
-- 
Austin Ziegler * halostatue / gmail.com * http://www.halostatue.ca/
               * austin / halostatue.ca * http://www.halostatue.ca/feed/
               * austin / zieglers.ca