From: Gary Wright Date: 2008-10-07T22:27:15+09:00 Subject: [ruby-core:19159] Re: [Feature #615] "with" operator On Oct 7, 2008, at 6:06 AM, David A. Black wrote: > It's not so much a scope thing as a 'self' thing. My understanding is > that it would produce a context where this happens: > > m # sent to one object > @v # instance variable of a different object It seemed to me that something different was being proposed. During the execution of the block, the object associated with 'self' is augmented with additional methods. When the block finishes the additional methods are withdrawn. It isn't the message dispatch mechanism that is changing but instead the included module list of the object's singleton class is being temporarily modified. So in your example, 'm' and '@v' are still evaluated relative to the same 'self'. Gary Wright