Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Superclass mismatch
William Crawford
9/5/2006 3:30:00 PM
Gareth Adams wrote:
> Hope someone can help work out what I'm doing wrong,
> Gareth
Changing your example slightly shows what could be the problem:
class QuestionnaireAnswerError < ArgumentError
attr_accessor :question_id
def initialize(*args)
self.question_id = args.shift
super(args)
end
end
class BadAnswerCountError < QuestionnaireAnswerError
end
class TooManyAnswersError < BadAnswerCountError
end
class TooManyAnswersError < QuestionnaireAnswerError
end
It looks like you've tried to define the class twice with different
super classes.
HTH
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Superclass mismatch
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password