On 6/19/06, uncutstone wu <uncutstone / sina.com> wrote: > Kroeger, Simon (ext) wrote: > >> def random_each > >> > >> > >> uncutstone > > > > I think it's a little bit to simple to be put in the standard lib. > > > > a.sort_by{rand}.each {|e| print e , ' '} > > > It is nice to see you make it so simple! Surely this would break some sort algorithms, since the same element can return different sort priorities (using rand)... I assume it doesn't break Ruby's sort algorithm?