From: Alex DeCaria Date: 2010-04-01T11:13:02+09:00 Subject: Re: change in number of leading spaces Your variable "stored" is only defined and used within the loop, so it is local to the loop, and is lost when exiting the loop code block. You need to either define it once outside the loop, before entering (stored = nil), or make it an instance variable (@stored). --Alex -- Posted via http://www.ruby-forum.com/.