[Nitro] Aspects

Trans transfire at gmail.com
Fri Aug 31 11:19:56 EDT 2007

On Aug 30, 4:36 am, "George Moschovitis"
<george.moschovi... at gmail.com> wrote:
> I find the second solution more natural (what matz descibes in the provided
> link) more natural.
> This is the behaviour I would expect. But, even the first solution may be ok
> in 90% of the cases.
> Unless theres is a considerable performance/complexity penalty, lets go for
> the second solution. Then we can switch to the official solution when Ruby
> 1.9 is finally released.

Okay, I have a good working solution for before and after advice.
Unfortunately, around advice are a real beatch. The problem is with
defining a special method (#super) inside the around advice's binding
(the advice is a Proc object). The idea being that one can just do:

  around :x do |*args|

Unfortunately I can't find a way to do this. And the only other
solution seems to be to pass in the "target":

  around :x do |target, *args|

But I don't like that --it's fine for a major aop framework, but not
for these light-weight advice wraps (at least IMHO).

T :(

More information about the Nitro-general mailing list