From: Gavin Kistner Date: 2006-12-23T05:14:27+09:00 Subject: Re: Randomizing an Array? From: jwcooper [mailto:jwcooper@gmail.com] > Gavin Kistner wrote: > > From: jwcooper [mailto:jwcooper@gmail.com] > > > I'm trying to randomize an array...[snip] > > > > randomized = my_array.sort_by{ rand } > > Thank you so much! It worked perfectly! No problems. You might search the mailing list archive on this topic if 'true' randomness (or close to it) is important to you. IIRC, there was a discussion a year or so ago about the amount of randomness in this randomization technique and how it wasn't quite as random as it could be. (And other, longer techniques were provided for the times when really really random sorting was needed.)