From: Ross Bamford Date: 2006-10-30T23:01:14+09:00 Subject: Re: how to reset and how to undefine a class On Mon, 2006-10-30 at 22:30 +0900, Trans wrote: > Trans wrote: > > Adriano Mitre wrote: > > > > > Besides, I would like to know how to undefine Song class, so that > > > Song.new produce a NameError, i.e., behaving as if it were never > > > defined. > > > > You can redefine a class entirely by giving it a new subclass. > > > > class Song < Object > > end > > s/subclass/superclass/ I don't get it: class SomeClass < String def ameth(a) p a end end class SomeClass < Object end SomeClass.new.ameth(10) :w !ruby -:7: superclass mismatch for class SomeClass (TypeError) -- Ross Bamford - rosco@roscopeco.REMOVE.co.uk