From: reavey Date: 2003-02-19T11:48:10+09:00 Subject: Re: help: append error on Array push --------------020400070108090008000807 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Thank you for your help. To define the problem better I broke the problem down by restarting only the essentials. I found that by doing a class SongList < Song the append method error went away. This is at the top of the structure: class Song def initialize(name, artist, duration) @name, @artist, @duration = name, artist, duration end end re-v Daniel Carrera wrote: >> Thanks for responding >> I get the same error." undefined method push for append" >> Is push a predefined function in the array function library? >> >> > >Call them "methods". Array is a class that contains the "push" method. >That means that *all* arrays necessarily have a push method defined. >That's part of what the words "class" and "method" imply. > > >You still haven't sent me a sample code that produces your error. I >cannot help you until you do that. > > > --------------020400070108090008000807 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Thank you for your help.  To define the problem better I broke the problem down by
restarting only the essentials.
I found that by doing a
class  SongList < Song
the append method error went away.

This is at the top of the structure:
class Song
def initialize(name, artist, duration)
@name, @artist, @duration = name, artist, duration
end
end

re-v

Daniel Carrera wrote:
   Thanks for responding
   I get the same error." undefined method push for append"
   Is push a predefined function in the array function library?
    

Call them "methods".  Array is a class that contains the "push" method.  
That means that *all* arrays necessarily have a push method defined.  
That's part of what the words "class" and "method" imply.


You still haven't sent me a sample code that produces your error.  I 
cannot help you until you do that.

  

--------------020400070108090008000807--