Hi -- On Mon, 6 Oct 2008, Paul Brannan wrote: > On Mon, Oct 06, 2008 at 10:46:49AM +0900, Nobuyoshi Nakada wrote: >> No. I'd implemented and tested it once but found it's just >> problematic rather than useful. For instance, how do you >> consider about instance variables? > > Instance_eval for initialization has surprising behavior for instance > variables (e.g. as in Ruby/Tk). > > A method that affects only method calls and not instance variables would > make this idiom more viable. > > I don't know whether that is a good thing or a bad thing. As much as I dislike the "stealth" instance_eval: def some_method(&block) instance_eval(&block) end I would still really not want to see a case where an instance variable did not belong to self. I think that rule should be inviolate. 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!