From: "David A. Black" Date: 2008-09-07T02:23:11+09:00 Subject: Re: Request for Block local methods, and Proc syntax Hi -- On Sun, 7 Sep 2008, Patrick Li wrote: > I think we need a way to preserve the scope elegantly, so that methods > and instance variables can still be accessed. > > The solutions posted so far are all pretty fragile still. It sounds like you want some kind of bifurcation of self, so that instance variables are resolved against one object and method calls against another. I'm not sure how that would work, even theoretically, and it sounds like it would be more fragile than just yielding an object to a block. David -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL Advancing with Rails January 19-22 Fort Lauderdale, FL * * Co-taught with Patrick Ewing! See http://www.rubypal.com for details and updates!