Prev: Bitwise 2010 ( IIT Kharagpur ) An Annual Algorithm Intensive Online Programing Contest
Next: Ruby Threads From C
From: Aldric Giacomoni on 1 Feb 2010 13:24 Robert Klemme wrote: > 2010/2/1 Aldric Giacomoni <aldric(a)trevoke.net>: >> >> One idea is to create an array, and then add arrays as elements. >> >> main_array = Array.new >> (1..10).times { main_array << Array.new } > > Either use (1..10).each or use 10.times - but (1..10).times won't work: > Whoops! That's what I get for crossing two thoughts. -- Posted via http://www.ruby-forum.com/. |