From: Tobias Reif Date: 2002-03-19T21:17:51+09:00 Subject: Re: Wanted: slick rubyesqe algorithm Marko Schulz wrote: > I am always a little afraid to modify a structure I am iterating > over. Different languages and libraries are differently robust > concerning this. Is it generally OK to do this in ruby? I once generated a hash from lines in a file (first_line = key; second_line = value; etc.), and somehow the result was really garbled: missing stuff etc. When I switched to using an array of two-element arrays, it worked well, IIRC. Unfortunately, I don't have the failing code anymore, but since then, I don't trust hashes anymore, which probably is unjustified. Does anyone have an idea what I might have done wrong? I think it has to do with "modifying a structure I am iterating over". Tobi -- * peace&love. * http://www.pinkjuice.com/