From: "trans. (T. Onoma)" Date: 2004-09-28T01:14:57+09:00 Subject: Re: local_method_missing possible On Sunday 26 September 2004 02:01 am, Markus wrote: > 1) Wouldn't that cause infinite recursion if you called B.new.a? > 2) Is this something like CLOS (common lisp object system) around > methods? (See http://www.aiai.ed.ac.uk/~jeff/clos-guide.html). If so, > I have an partial implementation that works in 1.8.0 (and I hope will > work in 1.8.2 final) 1) Good point. Actually, what is really needed, to make this work well, is a way to send the method on, up to the next level of the class/module hierarchy, without rerouting back to the bottom. 2) Thanks. I actually have many implementations of wraps already -- I take it you are using alias? Obviously local_method_missing is just a proto-idea, but what it intendeds to solve is related to dynamically creating wraps that apply to collections of methods, not just a single method. Also, it is for use in a specific context, namely a subclass. So the question is this: Given a class and a predefined 'wrapping' method, how do I create a subclass and a submethod to effect multiple methods in the class. Obviously I could just create a submethod for each class method, but that seems rather bulky. Hope that makes enough sense, T.