From: Tim Hunter Date: 2006-06-06T02:01:51+09:00 Subject: Re: Why doesn't method_missing affect respond_to? Pat Maddox wrote: > Guess I just thought Ruby would automatically pick it up. However, I > don't see how it'd be able to, short of creating a copy of the object > in memory and calling the method on the object to see if it returns a > result. If the copy gives a method missing error, then respond_to? > would return false. Obviously it would suck to create a copy and > actually call the method just to see if an object responds to it. > > Pat Not to mention the problems that could occur when Ruby tries calling a method just to see if it works: class War def start(type=:nuclear) ... end end war = War.new war.respond_to? :start -- Posted via http://www.ruby-forum.com/.