There are extra {} inside the for: { puts "predef $predef" }
It should be: puts "predef $predef"
Sorry, ignore my answer, I didn't read closely.