From: Christian Szegedy Date: 2002-09-06T21:50:44+09:00 Subject: Re: Ruby aesthetics ts wrote: >>>>>>"C" == Christian Szegedy writes: >>>>> > > C> Before the point where Ruby calls the rb_add_method, it copies the whole > C> subtree of the method definition and changes all nodes referencing the > C> private data members, and passes the root of the new subtree to > C> rb_add_method. > > Well, I see what you want to do, you even don't need to duplicate the > subtree but for me this just sound as a "bricolage" that I can accept only > in my sources (see fl.c) Why don't I have to duplicate the subtree? What is bricolage? What is fl.c? > > For example, you must modify more than just NODE_DEFN and NODE_DEFS > > class A; def a() @_m = 12; end end > a = A.new > a.a > a.instance_eval do > p @_m > end > I see, it seems that instance eval must substitute each occurence of @_... by the mangled name. Thanks for the lesson, Christian