Trans wrote: > > On Aug 7, 1:45 pm, "Keith Rarick" <k... / essembly.com> wrote: >> Perhaps the following notation would be better: >> >> class C >> decorate :memoized >> def tak(x, y, z) >> return z if x <= y >> tak(tak(x - 1, y, z), tak(y - 1, z, x), tak(z - 1, x, y)) >> end >> end >> >> It would obviate the need to redefine thedecoratormethod itself and >> thus simplify the implementation. Also, this notation is more explicit >> about the mechanism. > > That's not a bad idea really. It would make it clear when a decorator > is being used too. what about: class C decorate :memoized do def ... end end That makes the implementation much more simple and solid than relying on method_added which may be incorrectly overridden somewhere. Daniel