At Fri, 27 Apr 2001 03:20:06 +0900, Henning VON ROSEN <hvrosen / world-online.no> wrote: > Say, that a instance at first is known as belonging to a fairly general class,nd when > we gather more information, it turns out to belong more precisely to a subclass. > > Is this part of Ruby 'as is', or do I have to extend. Point is to keep instance id, > while the knowledge of which class it belongs tohanges. Just like in real world as > reflected in human language. (Changing to a subclassight be readily accepted, while > changing ton unrelated class would demand an admittance that the first guess was an > error.) I think it is dangerous to change classes of instances. Do you really need it? You can extend objects with mixin modules. class Person ... end module Runnable def run ... end end person = Person.new person.extend(Runnable) person.run > (2) How do I deleteun-mix) a mixin? I don't know how to delete a mixin, but undef or undef_method may be useful. class Runner include Runnable end class RetiredRunner undef run end Shugo