From: Corey Konrad <0011@...> Date: 2007-03-18T03:03:42+09:00 Subject: Re: inheritance question Rick Denatale wrote: > On 3/17/07, Corey Konrad <0011@hush.com> wrote: >> I am trying to figure out how inheritance works using the super method. >> With the sample code below i get the error that i dont have enough >> arguments for the constructor i dont understand why i am getting that >> error. >> > >> class Dog < Animal >> def initialize(color, age, sound) > super(color,age) >> @sound = sound >> end > > > Animals initialize method has two arguments. > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/ oh you just use 1 super method for all the args in the super class's constructor, i was doing super(color) super(age) but its just supposed to be super(color, age) ok thanks -- Posted via http://www.ruby-forum.com/.