From: Tom Sawyer Date: 2002-07-24T00:21:37+09:00 Subject: Re: define_method with super in the proc Mr. Ogata, very nice! very nice indeed. thank you, transami On Tue, 2002-07-23 at 09:06, George Ogata wrote: > Tom Sawyer wrote: > > > On Tue, 2002-07-23 at 05:15, ts wrote: > >> * eval.c (rb_call0): self in a block given to define_method now be > >> switched to the receiver of the method. > > > > thank goodness. after reading kents post i was about to cry. guess its > > time to upgrade. > > > > Is this feasible? > > class A > def doit > @x = 5 > end > end > > def makeproc > '; super; @y = 10' > #^ args can go before here > end > > B = Class.new(A) > B.class_eval "def doit #{makeproc}; end" > > b = B.new > b.doit > p b > > produces: > > # > -- ~transami