From: Nanyang Zhan Date: 2008-01-10T14:53:16+09:00 Subject: Re: method that generate block? Ckvok Kovsky wrote: > 0..10.times do |time| > vds[time].each do |my_var| > ds = << my_var > end > end > > create_new_filter(ds) > > ----------------- > I didn't test. thanks,but yours will only create one filter, and I want to create vds[0].size*vds[1].size*...*vds[n].size filters, basing on every ds value. Each ds value is a arrary that contains one value from the vds array. I mean this: n = vds.size dss = [] vds[0].each do |d0| vds[1].each do |d1| ... vds[n].each do |dn| dss << [d0, d1, ... , dn] end ... end end dss.each {|ds| create_filter(ds) } -- Posted via http://www.ruby-forum.com/.