Re: [Rails] Multiple Array Declarations.

2011-01-10 Thread Frederick Cheung
On 11 Jan 2011, at 07:40, Sandip wrote: > array1= array2... = array10 = [] This is very different - array1, array2 are being set to the same array rather than all being set to separate empty arrays. I can't think of a more concise way of creating 10 arrays other than not doing it: if you h

Re: [Rails] Multiple Array Declarations.

2011-01-10 Thread Sandip
array1= array2... = array10 = [] On Tue, Jan 11, 2011 at 12:33 PM, Hemant Bhargava wrote: > Hello Rubyites, > > Seems like this is a newbie question but want to get rid of it asap. > Googled but found nothing. > > I have some arrays(10 arrays) which i am using in my code. Now > declaraing/definin

[Rails] Multiple Array Declarations.

2011-01-10 Thread Hemant Bhargava
Hello Rubyites, Seems like this is a newbie question but want to get rid of it asap. Googled but found nothing. I have some arrays(10 arrays) which i am using in my code. Now declaraing/defining each/every array is redudant code as like array1, array2... array10 = [], [],...[] Is there any other