Robert Klemme wrote: > The concept is generally known as "closure". The closure captures variable > bindings so you can access them later: Right. In this case it just seems more facinating in how the two closure-spaces (I don't know the proper terminology) are intermingling. > 12:53:16 [source]: ruby -e 'x=10;f=lambda { x }; p f.call;x=20;p f.call' > 10 > 20 > 12:53:23 [source]: > > > Also, it would be nice to be able to take this one step further, if it > > were possible NOT to have to explictly pass 'binding' via > > #dyanmic_mixin or pass 'self' via the local var lambda, then it would > > be perfect. > > There is a module that allows access to the binding of the caller. This > would help you as it would make passing a binding explicit unnecessary. Thanks. Binding.of_caller is of some, but limited use. Not sure how to rid '[self]' with it. In playing with this I again find another of these methods whose "receiver" is actually the point-of-execution, in this case #binding. (I was recently talking Module.nesting which is one too). Yet with #binding, it sure would be nice if it weren't so. Then Binding.of_caller wouldn't be needed, and one could just do binding_of_caller = mod.binding. T.