From: "Jan E." Date: 2012-06-28T17:06:51+09:00 Subject: Re: Is this the correct use of rand? Hi, If you call rand(n) with n being an Integer, the method will return a pseudorandom Integer r with 0 <= r < n. So the result will never be n. If you want to include n, you have to call rand(n + 1). In newer versions of Ruby you can also pass a range to the rand method, which makes the whole thing more intutitive: rand(0..n) -- Posted via http://www.ruby-forum.com/.