It does exactly what I'd expect. The insert line expands to:

a.insert(2, 3, 4)  # a.length, b[0], b[1]

and so it inserts 3 and 4 at the end of the array. (It inserts before 
element #n, but since a has only elements #0 and #1, asking to insert 
before element #2 is the same as asking to insert at the end of the 
list)

irb(main):001:0> a = [1,2]
=> [1, 2]
irb(main):002:0> b = [3,4]
=> [3, 4]
irb(main):003:0> a.insert(a.length, *b)
=> [1, 2, 3, 4]
irb(main):004:0> a
=> [1, 2, 3, 4]

Of course, a += b is a simpler way to write this.

Do you get something different? I am using ruby-1.8.6p114 under Ubuntu 
Hardy.
-- 
Posted via http://www.ruby-forum.com/.