From: Aredridel Date: 2005-02-23T15:52:04+09:00 Subject: Temporary redefinitions > Ooo, this just gave me an idea! > > Block scope redefinitions of classes! > > withImaginaryHungryNilConstruct do > while(line = gets.chomp ) > # do stuff with line > end > end # here NilClasses's definition reverts back to normal > > You could do this in Ruby now, the only problem being is it would have > dynamic and not lexical "scope" if I may obscenely misuse a term. This > could be quite useful, I imagine, especially if it was generic (eg. > have a way of saying use these modifications for class X for the > duration of this block). > You might want to read this: http://nbtsc.org/~aredridel/2005/02/14-aspects.log >