At 11:56 08/10/07, _why wrote: >On Tue, Oct 07, 2008 at 05:47:23AM +0900, David A. Black wrote: >> 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. > >Mixing in a module for the duration of a block isn't a new kind of >context, though. You keep the current scope and get some additional >methods. I mean would you think that `require` is odd because it can >introduce a lot of methods without spelling them all out? Well, I think it's sligthly more than that: All these methods are essentially executed not with the current self, but with another, hidden, self. For those cases where that's what you want, it's just great, but it's still a bit of a strange feeling. Regards, Martin. #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst / it.aoyama.ac.jp