I have a method that returns a hash. I want to repeat through this method five times, collecting the results into an array. Right now, I'm trying it like this:
votes = 5.times.collect{ create_vote }.inject{|memo, vote| memo << vote}
This doesn't work, and I believe it's failing because memo isn't an array. Is there another approach I could take to this problem?