From: Trans Date: 2007-12-11T21:00:52+09:00 Subject: Re: Dynamically generate a symbol name On Dec 11, 6:51 am, Max Williams wrote: > I'm sure this is simple but i can't work out the syntax - if i want to > use a bunch of symbols that are named :object0, :object2 ... :object9, > how can i do something like > > 10.times do |n| > do_something_with(:object#{n} => "foo") > end 10.times do |n| do_something_with(:"object#{n}" => "foo") end T.