From: Trans Date: 2005-09-06T22:16:28+09:00 Subject: Re: Change Binding of a Proc Pit Capitain wrote: > Trans schrieb: > > ... > > p machine.instance_eval{ s } > > ... > > I meant: machine.instance_eval( &s ) > > In your tests you shouldn't define a local variable with the name of the > method you want to call in the proc: > > # s = 12 > x = proc { s } > machine.instance_eval( &x ) > > If you run this code, the "s" is resolved in the context of machine, but > if you remove the comment on the first line, the proc uses the local > variable. Thanks, I'l play with it some more. Actually I realized what you meant but I still had parameters to pass to the block -- and I don't see how I can get those in there -- perhaps wrapping a proc in a proc? Any which way I slice this it seems to be messy. T.