From: "David A. Black" Date: 2008-07-13T21:32:28+09:00 Subject: Re: Dynamic Arrary Names Hi -- On Sun, 13 Jul 2008, M. Muzaffar wrote: > Is there any way in ruby to create dynamic array names? > > correctarrayfiles=Dir.glob("array_ast_correct_*.rb").size > correctarrayfiles.times do |num| > correctfiles=findbug.file_exist("array_ast_correct") > array+num=findbug.mark_arrary(correctfiles[num]) > end > > There would be then a new arrays like > > arrary0 > arrary1 Try Googling as follows: create dynamic variables ruby As you'll see, it's impossible (or nearly so) and ill-advised. David -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails July 21-24 Edison, NJ Advancing With Rails August 18-21 Edison, NJ See http://www.rubypal.com for details and updates!