Subject: Re: add element at end of array
From: "Farrel Lifson" <farrel.lifson gmail.com>
Date: Tue, 12 Jun 2007 18:27:59 +0900
References: 255283
In-reply-to: 255283
On 12/06/07, Daniel Liebig <daniel.liebig / wevin.de> wrote:
> I just want to add a new value / object to an existing array. Right now
> i'm using
>
> a[a.length] = 'foo'
>
> but i'm almost sure Ruby has a better way to do that!?
a << 'foo'
Farrel