From: Robert Klemme Date: 2008-09-05T00:10:21+09:00 Subject: Re: Request for Block local methods, and Proc syntax 2008/9/4 Patrick Li : > I got around this by writing all the instance variables in "context" out > again at the end of the block. But it's not a very clean solution. Well, but it works remarkably well, doesn't it? > Is there anyway to retrieve the current block from within the block? > ie... > > block = lambda do > //bla bla bla > //how does a block refer to itself? > end As blocks have no conscience there is no way they know about themselves - at least none that I would be aware of. :-) Kind regards robert -- use.inject do |as, often| as.you_can - without end