Posted By: Dean Wampler
Date: 2007-11-24 16:51
Summary: aquarium 0.2.0 released
Project: Aquarium: Aspects for Ruby

V0.2.0 changes the parameter list used for advice blocks and adds numerous enhancements, robustness
improvements and more complete "spec'ing".

Bug fixes:

13402 Support a subclass syntax like AspectJ's "Type+"
13984 More flexible argument list to the advise block
14053 Remove JoinPoint#type, JoinPoint#type=, JoinPoint#object, and JoinPoint#object=
14061 Add a control flow mechanism to skipping (sic) intermediate advice
15164 Deprecate ObjectFinder
15413 Remove ObjectFinder
15710 Eliminate redundant public methods in various "finders"

#13402 adds new invocation options to specify types and their descendents (subclasses or modules
that include the specified module(s)) and ancestors. The latter should be used cautiously as it
will include things like Kernel, Object, and Class! I used new command options rather than the
AspectJ "+" suffix (and the proposed, but never implemented "-" suffix for ancestors), because
the "+" would be confusing with regular expressions and not in the spirit of trying to make
the pointcut language "easy to read". So, the following are now available:
And the corresponding:
If you want both the ancestors and descendents, just use both options with the same value.

#13984 adds the object as the second argument to the advice block parameter list. This change
reflects the fact that the object is often needed, but calling jp.context.advised_object is a
bit tedious. THIS CHANGE BREAKS BACKWARDS COMPATIBILITY!! An exception is raised if advice has
the signature |jp, *args|.

#14061 adds a new method, JoinPoint#invoke_original_join_point, which will invoke the original
method without intermediate advice. If called within around advice, you can write advice that
vetoes all subsequent advice, yet invokes the original method. Use this technique cautiously,
however, since you may not always know what other advices are involved and what side effects
this control-flow change might cause.

#15164 and 15413 remove ObjectFinder because it is not used and it requires ObjectSpace, which
has high overhead and won't be enabled, by default, in JRuby (it will be optional).

#15710 removes redundant methods that were becoming a maintenance issue, in particular,
MethodFinder#find_all_by and TypeFinder#find_by_name. This is a non-backwards-compatible API

Finally, note that I have not yet been able to resolve bug #15202, "Intermittent confusion
between classes and objects when invoking advice." I believe this is a very rare occurrence
and only likely to ever happen during the "torture-test" of running the RSpec suite. Please post
a comment to Tracker if you encounter it!

Latest News
TZInfo::Data v1.2014.2 Released
    Philip Ross - 2014-03-25 22:32
TZInfo v0.3.39 Released
    Philip Ross - 2014-03-09 20:23
TZInfo::Data v1.2014.1 Released
    Philip Ross - 2014-03-09 20:00
Automatic Ruby 14.2.0 has been released!
    id 774 - 2014-02-26 06:23
kramdown 1.3.2 released
    Thomas Leitner - 2014-02-16 08:35


Forums | Admin

Discussion Forums: aquarium-0.2.0-released

Start New Thread Start New Thread


Topic Topic Starter Replies Last Post