# Silly codeing error

**URL:** <https://www.ruby-forum.com/t/silly-codeing-error/81855>\
**Category:** Ruby\
**Created:** [January 15, 2007, 8:10pm UTC](https://www.ruby-forum.com/t/silly-codeing-error/81855 "2007-01-15T20:10:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 15, 2007, 8:10pm UTC](https://www.ruby-forum.com/t/silly-codeing-error/81855/1 "2007-01-15T20:10:26Z")

</div>

Hi  
I am a new programmer of ruby and am reading the pickaxe book. Working  
through the examples to try out my new spiffy ruby ide I thought I would  
try some very basic code from the book as below:

class Song  
def initiialize( name, artist, duration)  
@name = name  
@artist = artist  
@duration = duration  
end  
end

song = Song.new(“Bicyclops” , “Fleck” , 260)  
song.inspect

Now this fails with the following error `initialize’: wrong number of  
arguments (3 for 0) (ArgumentError)

I can see no error with this, has anyone got any ideas?

Adrian

---

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 15, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/silly-codeing-error/81855/2 "2007-01-15T20:17:44Z")

</div>

On 1/15/07, Adrian R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi  
> I am a new programmer of ruby and am reading the pickaxe book. Working  
> through the examples to try out my new spiffy ruby ide I thought I would  
> try some very basic code from the book as below:
> 
> ```
> def initiialize( name, artist, duration)
> 
> ```

Check the spelling there. 🙂

---

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 15, 2007, 8:19pm UTC](https://www.ruby-forum.com/t/silly-codeing-error/81855/3 "2007-01-15T20:19:44Z")

</div>

On 1/15/07, Adrian R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi  
> I am a new programmer of ruby and am reading the pickaxe book. Working  
> through the examples to try out my new spiffy ruby ide I thought I would  
> try some very basic code from the book as below:
> 
> class Song  
> def initiialize( name, artist, duration)

def initialize( name, artist, duration )

# one too many ‘i’ characters in “initialize”

---

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 15, 2007, 8:32pm UTC](https://www.ruby-forum.com/t/silly-codeing-error/81855/4 "2007-01-15T20:32:51Z")

</div>

> class Song  
> def initiialize( name, artist, duration)  
> @name = name  
> @artist = artist  
> @duration = duration  
> end  
> end

How have you spelt initialize??

---

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 15, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/silly-codeing-error/81855/5 "2007-01-15T23:09:45Z")

</div>

Tim P. wrote:

> On 1/15/07, Adrian R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Hi  
> > I am a new programmer of ruby and am reading the pickaxe book. Working  
> > through the examples to try out my new spiffy ruby ide I thought I would  
> > try some very basic code from the book as below:
> > 
> > class Song  
> > def initiialize( name, artist, duration)
> 
> def initialize( name, artist, duration )
> 
> # one too many ‘i’ characters in “initialize”

Yes thank you I now know my error!!

---

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 15, 2007, 11:12pm UTC](https://www.ruby-forum.com/t/silly-codeing-error/81855/6 "2007-01-15T23:12:37Z")

</div>

Wilson B. wrote:

> On 1/15/07, Adrian R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Hi  
> > I am a new programmer of ruby and am reading the pickaxe book. Working  
> > through the examples to try out my new spiffy ruby ide I thought I would  
> > try some very basic code from the book as below:
> > 
> > ```
> > def initiialize( name, artist, duration)
> > 
> > ```
> 
> Check the spelling there. 🙂

Yes thank you I now know my error!!

---

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 15, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/silly-codeing-error/81855/7 "2007-01-15T23:10:44Z")

</div>

David M. wrote:

> > class Song  
> > def initiialize( name, artist, duration)  
> > @name = name  
> > @artist = artist  
> > @duration = duration  
> > end  
> > end
> 
> How have you spelt initialize??

Yes thank you I now know my error!!
