From: Patrick Li Date: 2008-09-04T23:34:08+09:00 Subject: Re: Request for Block local methods, and Proc syntax So I thought about your code snippet a bit more Robert, and it's almost what I need. Which is, the ability to access the local scope, but also have access to the methods that are granted by the html-do-end method. so in your example, you can now do this: html do image(@source) end but you still can't do something this: html do @code = retrieveCode end puts @code <-- doesn't work, because this is a different @code than the one you assigned to. 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. 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 Thanks -Patrick -- Posted via http://www.ruby-forum.com/.