Superclass mismatch for class Email? why?


#1

Here is my code. I can't figure out why I keep getting the error "superclass mismatch for class Email"

class Message
   @@messages_sent = 0
   def initialize(from, to)
     @from = from
     @to = to
     @@messages_sent +=1
  end
end

class Email < Message
    def initialize(subject)
       @subject = subject
    end
end

#2

Try refreshing the page.

This error means that Email is already defined, but if this is your full code then obviously that's not true :smile:


#3

Okay, thanks that did it.


#4