From: "Matthias Wächter" Date: 2011-09-14T21:45:48+09:00 Subject: Re: Using a loop to run similar commands On 14.09.2011 14:22, dwight schrute wrote: > I actually played around a bit and then did this: > > 1.upto(12) do > |i| eval "create#{i} = agent.get(t#{i})" > end I still would encourage you to learn more – or at least *something* – about arrays¹ and other containers. You’re not gonna become a good Ruby coder with eval in your 2nd line of code. – Matthias 1: http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_containers.html