From: Hal Fulton Date: 2006-08-01T11:39:29+09:00 Subject: Re: I thought this was the one that worked? Chad Perrin wrote: > > Am I to assume that some_local_variable is going out of scope outside of > the lambda declaration at some point, to create that closure? > > > >> All things that are called "blocks" in Ruby are closures. >> Do you still have any questions on the matter? > > > Yes. Are you just failing to explain how these things are closures, or > do you not know what a closure is? You keep telling me blocks are > closures somehow, but you're not explaining how. Saying it doesn't make > it so. Please explain what I'm missing. > I'm unfamiliar with your assertion that the context has to go out of scope before a closure exists. Not trying to argue, just stating my perception. Maybe you can point us to a formal definition somewhere. I would have said that a closure *will* retain its variables *if/when* they go out of scope. Bad analogy: We might loosely define a car as "a machine that goes places," but it's still a car even when it sits still. My impression is that you're applying the definition too rigidly. Again, I'm not certain I'm right. No flames, no insults. Hal