From: chr_news@... (Chistoph) Date: 2001-11-04T04:30:32+09:00 Subject: [ruby-talk:24280] Re: Too much eval evil? (tell me why I shouldn't do this) .... > this is a crazy idea or not and also present alternatives: Hi, a while back Ben and Me had a thread about this. Your final solution was somewhere around the lines of class Array def multi_each __multi_each__(*self) {|arg| yield arg } unless empty? end private def __multi_each__(arg,*more_args) (more_args.empty?) ? arg.each { |r| yield [r] } : arg.each {|l| __multi_each__(*more_args) {|r| yield [l]+ r }} end end [0..10, 43..46, ['z','yz','xyz','xz','zz']].multi_each { |list| p "width is: #{list[0]}, length is: #{list[1]}, hight is: #{list[2]}" }