From: Martin DeMello Date: 2009-02-16T20:41:22+09:00 Subject: Re: How to do this complicated logic in ruby On Mon, Feb 16, 2009 at 4:43 PM, Luiz Vitor Martinez Cardoso wrote: > Using Symbols here make a big sense. Try to structure your array like: > > my_array[0] = {:server => "AHN", :hosp =>"AHN", :loc =>"PC1", > :pspec=>"ANA", :number=>"1", :pcat=>"1"} > > And for all the values that are frequently repeated use Symbols. Basically > when you use Symbols you create one object and all the times that you use > one object with the same name you create a referece to this object and NOT > another object. Making that you will free memory. Even better: http://www.codeforpeople.com/lib/ruby/arrayfields/ martin