From: Roger Reeks Date: 2008-10-17T00:36:18+09:00 Subject: Re: newbie adding to array question @fibresults= [] def initialize @iterations = 10 @previous = 1 @current = 1 @fibresults[0] =@previous @fibresults[1] =@current end def next_seq x = @current + @previous @previous = @current @current = x end def display_all count = 2 while count < @iteration next_seq count = count + 1 @fibresults[count] = @current puts @current end end -- Posted via http://www.ruby-forum.com/.