From: Ryan Leavengood Date: 2007-04-03T05:59:31+09:00 Subject: Re: Newbie problem: ArgumentError when creating subclass On 4/2/07, Dan Stevens (IAmAI) wrote: > Could someone explain why the following code raises ArgumentError. Thanks. > > class SuperClass > > def initialize #Make sure you spell 'initialize' correctly! > @my_attr = 1 > end > > attr_reader :my_attr > end > > class SubClass < SuperClass > > def initialize(data1, data2) > super This should be super(). Without the parenthesis it defaults to passing the arguments given to the current method to the super class's implementation. Ryan