From: Jason Lillywhite Date: 2008-06-12T05:05:50+09:00 Subject: Re: array collect - nil can't be coerced into Float (TypeErr I will settle with this: class MyArray def count a = [1,2,3] b = [0.5,0.25] num = a.length i = 0 c = [] while i < num do c << b.collect {|x| x * a[i]} i += 1 end puts c end end number = MyArray.new number.count that way it does matter if I change the length of a. thanks again. -- Posted via http://www.ruby-forum.com/.