From: Peter Hicks Date: 2011-06-12T06:42:18+09:00 Subject: Re: Iterating over an Array of Hashes All, Apologies, I lost track of the thread. On Thu, 2011-05-05 at 06:38 +0900, Douglas Seifert wrote: > So, original poster: what were your intentions? Did you need the only the > hashes in the array preserved, or did you ALSO need the contents of the > hashes in the array preserved? If the former, then clone/dup is fine. If > the latter, then you need some kind of deep copy. The "simplest" deep copy > I can think of is the Marshal#dump/load one. I just needed the hashes in the array preserved. I've done this with .clone now, and it works like a treat. I now have other problems over ActiveRecord's slowness and various other parts of the "correct but slow" code :) Thanks for your help - this was one area in which I truly had a surprise when my unit tests failed! Peter -- Peter Hicks