OK...

I see the idea, and it is tempting.  For code written for me to be used 
by me it is in fact ideal.  However, I guess I have two follow up 
questions, both about failing gracefully:

What is the "right" way to make sure the errors these functions report 
are nice to people who may use the functions/libraries I code?  "Foo.bar 
takes a Duck, not a Cow" would be a very helpful error message.  object 
of type Cow does not have method of type quack, is also not a bad error 
message, but it would be nice to let the user know which type of object 
in fact does have the method "quack" (presumably it would not always be 
as obvious as "quack"==>"duck").  Or is the ruby way, since its an 
interpereted language, for a user of my library to crack open the ruby 
or rdoc/ri and look?

What is the "right" way to make sure that, if my libraries or functions 
are misused by someone (possibly me :p), the user of the script/program 
receives a non-programmer-targeted friendly error message like "Whoops, 
we sent a Cow to do a Ducks job.  Feel free to report the bug to 
cows.and.ducks.sorting.co / notarealemail.com.  Make sure to include the 
following: <normal error dump>"?
-- 
Posted via http://www.ruby-forum.com/.