From: Gavin Kistner Date: 2004-09-28T21:14:02+09:00 Subject: Re: Binding of the Caller (redux) On Sep 28, 2004, at 2:16 AM, Mauricio Fern�ndez wrote: > On Tue, Sep 28, 2004 at 12:56:25PM +0900, Gavin Kistner wrote: >> ./libs/binding_of_caller.rb:61:in `of_caller': Binding.of_caller used >> in non-method context or trailing statements of method using it aren't >> in the block. (ArgumentError) > > The message is quite explicit *g* Perhaps, but confusing to me :) (The phrase "Either your zyloxens aren't grimbled or you tweedled outside of a borklub" is also explicit, but that don't mean I have a clue how to solve the problem ;) > Binding.of_caller do |b| > evt.source = eval("self", b) > callbacks.each{|m| m.call evt } > end > end That worked, thanks. So does "... trailing statements of method using it aren't in the block" mean "you can't place any statements after the Binding.of_caller invocation"? (Like it irrevocably changes the context and can't get you back to where you were or something?) -- (-, /\ \/ / /\/