Ruby : Generate Random number in a range less one element : <p>Folks, </p>

<p>I'm trying to generate a random number between (0..10) less, say, 5. </p>

<pre><code>new_index = rand(0..(old_index - 1)) || new_index = rand((old_index + 1)..10)
</code></pre>

<p>Can anyone shed any light?</p>
