Is there a limit on the size of an array in ruby?

Viewed 11676

Possible Duplicate:
Array size too big - ruby

Sorry if this has been asked, I looked around but didnt really find what I was looking for.

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:

 users = []
 users.clear
 
 # Update the list of users to follow
 res = dbh.query("SELECT user FROM usernameDB")
 while row = res.fetch_row do
   users << row[0] #adds each user to the array
 end

This has worked fine up until now, when we started recieving a lot more users. Now the code gives me unknown errors.

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?

Thanks!

2 Answers
Related