From: Mauricio Fernandez Date: 2006-08-07T07:13:04+09:00 Subject: Re: Superclass mismatches On Mon, Aug 07, 2006 at 07:00:06AM +0900, listrecv@gmail.com wrote: > I'm sometimes seeing an error "superclass mismatch". I have no idea > what this error is. could anyone either explain it or point me to the > docs (or src code)? X = Class.new Y = Class.new class Foo < X; end class Foo < Y; end # ~> -:4: superclass mismatch for class Foo (TypeError) In the above situation it's obvious that you're saying that Foo is derived from X at first and then Y (!= X) the second time, but you might have run into this problem with something like class Foo < Struct.new(:a, :b, :c) # .... end if you load()ed that file more than once (this can happen if you require() the file under two different names), since each time Struct.new is evaluated a new class will be created. -- Mauricio Fernandez - http://eigenclass.org - singular Ruby