From: Hugh Sasse Staff Elec Eng Date: 2000-08-21T23:40:01+09:00 Subject: [ruby-talk:4527] for and multiple assignment? Ruby already has mutiple assignment. Would it be possible to extend for to allow multiple things to be selected at once? for p1, p2, p3, result1, result2 in long_list_of_tests do mine = My_class.new() mine.method1(p1,p2,p3) assert_equal(result1, mine.feature1()) assert_equal(result2, mine.feature2()) end seems to be more readable to me than: while long_list_of_tests.length do p1 = long_list_of_tests.shift p2 = long_list_of_tests.shift p3 = long_list_of_tests.shift result1 = long_list_of_tests.shift result2 = long_list_of_tests.shift mine = My_class.new() mine.method1(p1,p2,p3) assert_equal(result1, mine.feature1()) assert_equal(result2, mine.feature2()) end Maybe there is a good reason why this has not been allowed. Hugh hgs@dmu.ac.uk