title: Random number generator issues in Ruby
body: <p>My intention here is just to fill up an array with numbers in order from 1, to a random number between 1 and 1000. However, after repeatedly running this code (about 50 times), the highest number I have gotten is 120, and only twice has it been over 100. The majority of my arrays were anywhere between 0 and 60. This behavior appears off to me. Am I doing something wrong?</p>
  
  <pre><code>my_array = []
  i = 0
  while i &lt;= rand(1000)
      my_array &lt;&lt; i 
      i += 1  
  end
  
  puts my_array.count
  puts my_array
  </code></pre>