From: Ryan Davis Date: 2010-10-15T06:39:24+09:00 Subject: Re: Kind of nested loops On Oct 14, 2010, at 14:30 , Veedo Dream wrote: > I am trying to get this going where i have this build array and then I > have an array of hashes named after the items in the build. Depending > upon what is in the array, I want to read the arrays of hashes. I wrote > this simple script, but does not work. Any solns Meta: I'd first suggest that you not build your own build system and look at rake instead. NonMeta: Instead of splitting everything up and nesting your loops, nest your data structure instead: build = { "log" => { 'where' => 'blocks/where.rb', 'when' => 'blocks/when.rb', 'bank' => 'blocks/bank.rb', }, "top" => { 'where' => 'blocks/where.rb', 'when' => 'blocks/when.rb', 'bank' => 'blocks/bank.rb', } } I didn't see any point in having an array of hashes with single pairs in them, so I took that out too. Absolute paths in build systems are brittle, use relative paths instead.