From: ts Date: 2005-12-07T01:05:56+09:00 Subject: Re: Shuffling an array, sort_by{rand}'s bias (was Re: need some Ruby >>>>> "U" == Uwe Schmitt writes: U> If you use random as sorting key, the result of a<=>b U> will differ each time you evaluate a<=>b. U> In my case I attach a random number to each item, U> then I sort my list according to this number and remove U> this 'decoration' afterwards. run ri Enum#sort_by and see what it do. Guy Decoux