From: Stephen Waits Date: 2005-12-07T04:57:31+09:00 Subject: Re: Shuffling an array, sort_by{rand}'s bias (was Re: need some Ruby Stephen Waits wrote: > > h = Hash.new > self.each { |v| h[rand(1000000000)] = v } > h.keys.sort.collect { |k| h[k] } OOPS! I forgot to deal with collisions in the hash! :( --Steve