title: Is there a limit on the size of an array in ruby?
body: <blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="https://stackoverflow.com/questions/3687517/array-size-too-big-ruby">Array size too big - ruby</a></p>
  </blockquote>
  
  <p>Sorry if this has been asked, I looked around but didnt really find what I was looking for.</p>
  <p>I am using ruby and mysql to create an array based off of a single column in the mysql table. So for example, say I have a column of user names:</p>
  <pre><code> users = []
   users.clear
   
   # Update the list of users to follow
   res = dbh.query(&quot;SELECT user FROM usernameDB&quot;)
   while row = res.fetch_row do
     users &lt;&lt; row[0] #adds each user to the array
   end
  </code></pre>
  <p>This has worked fine up until now, when we started recieving a lot more users. Now the code gives me unknown errors.</p>
  <p>In an attempt to troubleshoot, I simply commented out most of it and built the array with just a couple of user names, and everything worked again. So my question is, is there a limit to the number or items in a ruby array?</p>
  <p>Thanks!</p>