From: "David A. Black" Date: 2008-10-07T05:47:23+09:00 Subject: [ruby-core:19150] Re: [Feature #615] "with" operator Hi -- On Tue, 7 Oct 2008, Austin Ziegler wrote: > On Mon, Oct 6, 2008 at 3:34 PM, Trans wrote: >> On Oct 6, 2:11 pm, _why wrote: >>> While investigating Guy Decoux's old messages, I've recently >>> discovered a way to do exactly this. It involves inserting a mixin >>> into the inheritance chain and then enabling and disabling it as >>> needed. >>> >>> >> >> Jimmy Crickets! That code is so straight forward. Er... Why isn't this >> core Ruby? > > What I'm wondering is if this might be a way to do selector namespaces > that everyone has been asking for... I've only looked at it briefly, and maybe I'm not getting it, but it strikes me as kind of odd to have a situation where bare method calls go to one object and instance variables belong to another. The merit of instance_eval is that, though it changes context, it doesn't introduce a new kind of context. 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!