From: Florian Gross Date: 2004-09-29T01:29:22+09:00 Subject: Re: Binding of the Caller (redux) 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 ;) > > 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?) It is this way because otherwise the statements would get executed twice. That would be quite confusing and possibly even dangerous. I tried to make the interface obvious in the documentation (see the sample), but I seem to have failed. Do you have any suggestions for how I could fix this? Regards, Florian Gross