From: Jesús Gabriel y Galán on 25 May 2010 11:07 On Tue, May 25, 2010 at 4:56 PM, Robert Dober <robert.dober(a)gmail.com> wrote: > 2010/5/25 Jesús Gabriel y Galán <jgabrielygalan(a)gmail.com>: > >> irb(main):005:0> self.class.send(:remove_const,:Soda) > > should that not rather be > Object.send .... Could very well be :-). I just saw that remove_const was a method in Module and I thought: self.class is a Module, so I'll use that. Jesus.
From: Robert Dober on 25 May 2010 12:50 2010/5/25 Jesús Gabriel y Galán <jgabrielygalan(a)gmail.com>: > Could very well be :-). > I just saw that remove_const was a method in Module and I thought: > self.class is a Module, so I'll use that. Where did I have my head? send remove_const to Object for top level constants and for all other to their defining module object, of course. Sorry got confused with irb output - that is waaay of a bad excuse I know ;) Cheers R. -- The best way to predict the future is to invent it. -- Alan Kay
First
|
Prev
|
Pages: 1 2 3 Prev: [ANN] mkmf-lite 0.1.0 Next: lime wire pro Full very speed ...new Versiyon |