From: dblack@... Date: 2007-06-17T03:22:41+09:00 Subject: Re: class destruction (evil genius metaprogramming) Hi -- On Sun, 17 Jun 2007, Devin Mullins wrote: > dblack@wobblini.net wrote: >> I do sometimes wonder what would happen if the ancestry array were >> writeable. It could be interesting. I haven't thought through the >> possible pitfalls. > > You mean, like Object#become? :) Not exactly. As I understand it, #become involves references changing from one object to another. I'm thinking of something more like: module M end a = Object.new class << a ancestors.unshift(M) # essentially same as a.extend(M) end > Seriously, how would that play with the core classes, which don't keep their > state in instance variables? I'm not sure how that would matter specifically. What problem are you envisioning? (Not that the whole thing wouldn't be a train-wreck anyway :-) David -- * Books: RAILS ROUTING (new! http://safari.awprofessional.com/9780321509246) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.com)