From: 7stud -- Date: 2007-11-06T14:11:50+09:00 Subject: Re: Affecting variables inside a while loop that are initialised outside its scope You have = and == mixed up. == compares two values. Also, to add 1 to a variable you do the adding on the right side of an = sign: val = 0 val = val + 1 #or the shorthand: val += 1 -- Posted via http://www.ruby-forum.com/.