From: Claus Spitzer Date: 2004-07-17T08:09:57+09:00 Subject: Re: Altering method lookup Thanks to everyone who posted suggestions and links. They are quite useful indeed, and give me some new ideas. Regarding the following: On Sat, 17 Jul 2004 04:02:16 +0900, Martin DeMello wrote: > Claus Spitzer wrote: > > not what I intend it to do (eventually). What I thought would happen > > is that when the object instance first gets the message for bar, bar > > (which would be an instance of Method) would be still undefined, so > > method_missing would get a message to look up bar, which is why I used > > method_missing to start with. > > I'm not sure I understand this - why would you expect bar to be > undefined at this point? > > martin > > I was under the (probably incorrect) impression (due to other documents read and a less than optimal memory on the subject) that an object's instance first doesn't knwo which its methods are. Once they are found (via, e.g., method_missing) they would be known and all further references would act on the method, but the first call would be to method_missing. By now I realize that it is not the way it is doen in Ruby. Finally, answering Gabriele Renzi's question: yes, it is doesNotUnderstand. It had slipped my mind and instead of going back to the documentation I made up a name. My bad. Let me again express my gratitude to all who answered. -CWS