From: newbie Date: 2006-05-25T01:08:11+09:00 Subject: Re: disappearing hash values? Ryan Leavengood wrote: > On 5/24/06, newbie wrote: >> >> why does the value of filehash[filename] disappear in the second "if"? > > An if statement introduces a new scope, so the filehash in the first > if is not available inside the second if. If you move the creation of > the hash outside both ifs and then just update it within the first if, > it will work as you expect. > > Ryan i need to update it in both ifs though i need to put a starting line and an ending line -- Posted via http://www.ruby-forum.com/.