From: Roger Reeks Date: 2008-10-16T23:50:13+09:00 Subject: newbie adding to array question hi, i have the following code in my project def next_seq x = @current + @previous @previous = @current @current = x end def display_all count = 2 while count < @iteration next_seq count = count + 1 puts @current end end ive been trying to add the result each time the result is calculated to array but keep getting stuck my idea was puttting @fibresults[count] = @current in the while loop, but i keep getting nil when i try and access it later on thanks for any help -- Posted via http://www.ruby-forum.com/.