From: Jason Lillywhite Date: 2008-06-12T08:20:47+09:00 Subject: Re: subtracting arrays OK, I see. so this works: a = [1,2,3] b = [1,1,1] c = [] i = 0 while i < 3 do c << a[i] - b[i] i += 1 end p c.each_with_index {|item,index|} Thanks. -- Posted via http://www.ruby-forum.com/.