From: David Springer Date: 2010-03-02T04:55:36+09:00 Subject: Re: Random integer within a range? Reiichi Tyrael wrote: > Inclusive! Okay, I'll assume that these are two different positive integers. Try this: number_to_guess = (n2 > n1) ? n1 + rand((n2-n1+1)) : n2 + rand((n1-n2+1)) -- Posted via http://www.ruby-forum.com/.