From: Gary Wright Date: 2007-12-12T00:45:43+09:00 Subject: Re: Dynamically generate a symbol name On Dec 11, 2007, at 7:00 AM, Sam Smoot wrote: > > :"object#{n}" is the syntax. Or just "object#{n}".to_sym. > > I would avoid doing this though. Symbols aren't meant to represent > infinite variations. They're stored in a Hash internally, so the more > symbols you add, the slower they get. Hash table performance shouldn't be affected by size, that is the whole point of using a hash table. The memory footprint will grow as you add symbols and since symbols are not garbage collected in MRI you might end up with a memory leak if you are constantly generating new symbols. Gary Wright