From: Dave Thomas <Dave / thomases.com> Subject: [ruby-talk:01084] Infinite loop Date: 10 Jan 2000 18:30:20 -0600 > I don't know if this is a bug or expected behavior - I could argue it > either way, but.. it is expected behavior as far as I can tell. The method Array#=, or should I say method Array#[]=(?), takes the reference of a, not a copy of a. you can use Array#dup to create a copy of a to insert to a[1]. $ ruby -e "a=[1,2,3]; a[1]=a.dup; p a" [1, [1, 2, 3], 3] hope this helps, -- yashi