>>>>> "C" == Christoph Rippel <crippel / primenet.com> writes:

C> solution for an individual class  -  the parsing rules of Ruby seem to
C> imply that a plain "sym=  l"  is  never interpreted as "self.sym=(l)" .
C> Maybe
C> it is possible to change the parsing rules a bit so that  sym= x is
C> interpreted as "self.sym=  l"  and/or make the __this__ pointer
C> superfluous all together?  The second part is the automated version ..

 I don't understand you want that

 'sym=' is interpreted as self.sym=

 and

 'sym =' interpreted as a local variable ?


C>    def attr_inner_accessor  sym
C>          attr_accessor sym
C>          include ThisPointerModule
C>          extend ThisPointerModule
C>          module_eval   "def set_#{sym.to_s} (x) \
C>                       @__this__.#{sym.to_s} =  x end"
C>     end

 If I've well understood your source, you replace a NODE_ATTRSET with a
call to a def (which is slower), no ?



Guy Decoux