Hi,
In message "Re: un_include and un_extend"
on Fri, 7 Apr 2006 00:46:47 +0900, "Jacob Fugal" <lukfugl / gmail.com> writes:
|Actually, as Austin mentions in a followup email, that last line was a
|typo. It would actually be:
|
| foo.start_transaction
|
|The idea, I'm guessing (I don't know the internals of
|Transaction::Simple) is that Transaction::Simple.start(foo) extends
|foo with a module which includes the #start_transaction method, then
|calls foo.start_transaction with the block provided. It would be nice
|if you could then unextend the module so that foo.start_transaction
|once again throws NoMethodError (since it did initially) after leaving
|Transaction::Simple::start.
It still sounds like bad manner for the same reason. Besides it's not
thread safe. If I were designing Transaction::Simple, I'd create
t_foo as a delegation object to the original foo. But I might be
still missing something.
matz.