From: Siep Korteling Date: 2010-03-02T05:47:12+09:00 Subject: Re: Random integer within a range? Reiichi Tyrael wrote: > It's work! Thank you David! > But there is no way to do it like in my version "rand(n1..n2)"? It's > more friendly that way XD #ruby 1.9 puts (10..20).to_a.sample #ruby 1.8.6 puts (10..20).to_a.sort_by{rand}.pop hth, Siep -- Posted via http://www.ruby-forum.com/.