Hi,
In message "[ruby-talk:03452] Re: Array of structs in Ruby"
on 00/06/16, Jilani Khaldi <jilanik / tin.it> writes:
|> persons = [Person::new, Person::new]
|
|but if I need here, say, 1000 records, or better, a variable number of
|records, how to declare them?
persons = []
1000.times{ persons.push(Person::new) }
or
persons = (0...1000).collect{ Person::new }
matz.