From: Ian Macdonald Date: 2002-10-09T17:11:35+09:00 Subject: Re: inserting an element to array at a specified position On Wed 09 Oct 2002 at 16:47:52 +0900, David Garamond wrote: > David Garamond wrote: > >since ruby's array doesn't have index(POS, OBJ) like in python, nor > > sorry, i meant insert() not index(). irb(main):001:0> foo=%w(a b c) ["a", "b", "c"] irb(main):002:0> foo[1..0]='d' "d" irb(main):003:0> foo ["a", "d", "b", "c"] Ian -- Ian Macdonald | "Be *excellent* to each other." -- Bill, or ian@caliban.org | Ted, in Bill and Ted's Excellent Adventure | | |