From: transfire@... Date: 2006-07-23T06:00:03+09:00 Subject: Re: Meta-Meta-Programming, revisited Erik Veenstra wrote: > > > So, you should write aModule.meta_class.wrap_method (using > > > Why's little meta library...). > > > > Well, that's the thing. I'd rather do > > > > aModule.meta.wrap_method > > aModule.meta.pre_condition > > I agree. I added it to my (not-yet-published) version. > > What about the abuse of Array and Object, as arguments? I'm not sure the Array abuse is needed if you limit the arguement to the array itself, eg. don;t splat it whencalling the block. The reason is that block unlik lambdas are more flexiable with array argument and cna automatically splt them. Then you can just use #replace tpo change the args if you want: $a = ["a", "b", "c"] def c(&block) block.call( $a ) end c { |a| p a.replace([2,3]) } $a #=> [2, 3] But also, c { |a,b| p a+b } #=> 5 I'll have to look at the Object abuse again and get back to you. T.