From: corey konrad <0011@...> Date: 2006-05-15T08:41:39+09:00 Subject: Re: begining programmer questions so gets changes the array into a string object during each loop and then just keeps changing the what is in that string object ok i understand that. I still dont understand the issue with "exit" thouse i dont see how i am putting exit into anything, i am just testing to see if info is == to exit i thought. I dont know maybe i should stick with networking, lol this stuff is frustrating i dont know how a person could do this 8 hours a day. Michael Gorsuch wrote: > 'gets' will read a string from input and build a new string object. > > When you did 'info = gets.chomp', you wiped out your array and made it a > simple String object. > > 'exit' is being stored because your program logic is placing the string > into > the Array, and then checking to see if the last retrieved value is > 'exit'. > > You may be better off using a temporary variable first, checking it, and > then storing it. -- Posted via http://www.ruby-forum.com/.