From: Corey Konrad <0011@...> Date: 2007-03-18T02:50:37+09:00 Subject: inheritance question 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 Animal def initialize(color, age) @color = color @age = age end attr_accessor :color attr_accessor :age end class Dog < Animal def initialize(color, age, sound) super(color) super(age) @sound = sound end attr_accessor :sound end dog = Dog.new("red", 25, "Bark") puts "The new dog is #{dog.color}" puts "The age of the dog is #{dog.age}" puts "The new dog says #{dog.sound}" -- Posted via http://www.ruby-forum.com/.