From: daz Date: 2004-07-18T17:07:12+09:00 Subject: Re: DUPSETUP I wrote: > > RARRAY(dup)->len = RARRAY(ary)->len; > > [...] then the length update seems to be redundant [...] > Sorry, to save someone correcting me ... rb_ary_new2(length) .... creates an array with capacity of "length" but with current_length == 0. So the real current_length must be inserted (happens to be the same as capacity, so any added entries will force reallocation). :daz