From: Chris Shea Date: 2008-07-28T13:09:49+09:00 Subject: Re: Is it possible to change the superclass of one class dynamic On Jul 27, 9:47 pm, Sean Liu wrote: > I want to change the super class of one class in one of plugins, for > example, > in plugin > class A < B > > end > in rails initialization configuration file, > class A < C > > end > > but when i did this, the error: "TypeError: superclass mismatch" > appreared. > > So can we change the super class of one class dynamically? > > Thanks. > -- > Posted viahttp://www.ruby-forum.com/. No. That is not possible. It is, however, possible to include (and extend) modules into a class to change its method and constant lookup hierarchy. What is it you're actually trying to accomplish by changing the superclass? Chris