From: Christopher Dicely Date: 2011-05-05T07:42:58+09:00 Subject: Re: Iterating over an Array of Hashes On Wed, May 4, 2011 at 3:17 PM, Chad Perrin wrote: > On Thu, May 05, 2011 at 06:21:00AM +0900, Christopher Dicely wrote: >> On Wed, May 4, 2011 at 1:50 PM, Chad Perrin wrote: >> > On Thu, May 05, 2011 at 04:17:53AM +0900, Christopher Dicely wrote: >> >> >> >> The #clone based method presented upthread (which wasn't mine, it was >> >> 7stud's) works perfectly for the data and requirements presented. It >> >> doesn't work if, in addition to wanting to lose changes to the passed >> >> hashes, one also wants to lose any changes resulting from manipulation >> >> of the data in the hashes, but that wasn't requested. >> > >> > Are you seriously claiming that the person's statements seemed to you to >> > indicate a desire for the data to change in the original data structure? >> >> No, I'm claiming that the original requester's statement didn't >> indicate a need to protect against changes resulting from calling >> mutating methods on the keys or values of the hashes, only protection >> from changes resulting from mutations on the hash. > > He didn't specify "only protection from changes resulting from mutations > on the hash." Yes, which is why I used the word "indicated" rather than "specified"; those words have very different meanings. I certainly think that, as at one commenter has stated, the original request was sufficiently ambiguous to support different readings. I think we've addressed the relative utility of the various options that have been present sufficiently that the OP (or others with similar concerns) can make up their minds about what approach is best for their use cases, or ask cogent follow-up questions if they need more information. Clearly, we disagree on what the best interpretation of the original posters requirements is, but I think we are clearly past the point where further discussion of that disagreement has any value for anyone reading.