2007-12-11 配列をランダムに並び替える ruby 配列をランダムに並び替えるには以下のようにする。 a=[1,2,3,4,5] a.sort_by{rand} # => [3, 1, 5, 2, 4] ruby-list:43811 - Re: 配列についての質問