From: Bertram Scharpf Date: 2007-04-03T07:21:24+09:00 Subject: Re: Newbie problem: ArgumentError when creating subclass Hi, Am Dienstag, 03. Apr 2007, 05:59:31 +0900 schrieb Ryan Leavengood: > 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! > >... > > > >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. Ah, parentheses do the trick. I always helped me calling super *[] what is not actually readable or beautiful. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de