Hi,

In message "Re: inserting an element to array at a specified position"
    on 02/10/09, David Garamond <davegaramond / icqmail.com> writes:

|> ary = [0,1,2]
|> ary[1,0] = "a"  # => ary = [0,"a",1,2]
|
|hm, that's the ugliest thing i've seen in ruby so far. :-)

Then use insert (1.7.x only).

  ary=[0,1,2]
  ary.insert(1,"a")

|since ruby already has a rich set of methods for Array, including 
|convenience/"secondary" stuffs like flatten(), indexes(), or rassoc(), 
|wouldn't it make some sense to add insert() too? just a suggestion. (i 
|could add the method myself, of course, but...)

I guess I've heard you long before you opened your mouth. ;-)

							matz.