From: ara.t.howard@... Date: 2006-11-09T05:33:10+09:00 Subject: Re: Proc as Observer On Thu, 9 Nov 2006, James Edward Gray II wrote: > On Nov 8, 2006, at 12:55 PM, Trans wrote: > >> Given your approach I think I'd just go ahead and do: >> >> class Proc >> alias :update :call >> end > > I thought Tim's solution was far more elegant. Notice how he resisted > gratuitous hacking of the core. not to mention tim's solution can be neatly extended to def observer &b o = lambda &b class << o alias_method 'update', 'call' end o end in fact, you'd thing add_observer would accept a block and do exactly this. regards. -a -- my religion is very simple. my religion is kindness. -- the dalai lama