From: ts Date: 2002-04-23T23:20:02+09:00 Subject: Re: Random numbers >>>>> "S" == Sergey Kravchenko writes: S> I know it's old, :) but can anyone tell me how to get random numbers in S> Ruby, I would be most grateful for a really nice piece of code. pigeon% ruby -e '4.times { p rand }' 0.5453656249 0.5369974664 0.9211747023 0.5819860747 pigeon% pigeon% ruby -e '4.times { p rand(12) }' 2 3 3 7 pigeon% You have #srand to initialize the generator. Guy Decoux