Let's simplify a bit.

I will put a list of files in array.

irb(main):017:0> list = ["first.rb", "second.rb", "third.rb"]
=> ["first.rb", "second.rb", "third.rb"]

I want them printed in the order they are in array (first.rb, second.rb,
third.rb)

irb(main):018:0> list.each { |x| puts x }
first.rb
second.rb
third.rb
=> ["first.rb", "second.rb", "third.rb"]

If you want to run them in that order, just replace "puts" with "require"

list.each { |x| require x }
--
Zeljko Filipin
zeljkofilipin.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to