From: Ryan Davis Date: 2012-06-26T06:03:24+09:00 Subject: Re: Array#sample is Set#sample and not Array#sample ! On Jun 25, 2012, at 09:55 , Bartosz DziewoƄski wrote: > 2012/6/25 Robert Klemme : >> I am sorry, I don't get it. Can you explain what your expectation is? > > I think he wants to keep the ordering or original array in the result > of #sample. > > This might actually make sense. So you would expect `(1..3).to_a.sample(3)` to always output [1, 2, 3] ? That doesn't make sense to me. >> (1..3).to_a.sample(3) => [1, 3, 2] >> (1..3).to_a.sample(3) => [1, 2, 3] >> (1..3).to_a.sample(3) => [2, 1, 3]