Gregory Seidman wrote: > On Thu, Sep 21, 2006 at 03:39:12AM +0900, Joel VanderWerf wrote: > } To extend Austin's point a little: In ruby, it really has to be this > } way. What if an object responds to a message by way of method_missing? > } There's no easy way to validate that. > > Actually, it is the developer's responsibility to override respond_to? when > overriding method_missing. To do one and not the other is just sloppy. > An interesting point, and tentatively it seems reasonable (though there are probably exceptions). Along those lines, you might also want to add the method to the instance_methods list so that reflection works as expected. One interesting variation on the use of method_missing that I've used once or twice is: When method_missing is called, *create* the method and make it do the "right thing." Then respond_to? and reflection will henceforth work as expected. Hal