From: "David A. Black" Date: 2003-11-27T21:03:16+09:00 Subject: Re: Method wrapping Hi -- On Thu, 27 Nov 2003, T. Onoma wrote: > On Thursday 27 November 2003 12:32 am, Yukihiro Matsumoto wrote: > > responsibility to define Ruby2 behavior: > > |1. Is it possible to add multiple wrappers for a method or > > |not? Do they "stack"? > > > > They stack. > > > > |2. If they do stack, is it possible to redefine a method as we > > |are used to doing? Or will that simply add a new wrapper? > > > > Re-defining primary method (method without :pre, :post, or :wrap) > > replaces old primary methods. > > I would like to point out that their is some inconsistentcy in this behavior, > in that def behaves differently depending on whether it is defined in class > augmentation or a subclass. It's not really different behavior on the part of def. def always does the same thing; the difference lies in how this affects subsequent method lookup order, which is a separate matter not decided by def itself. David -- David A. Black dblack@wobblini.net