From: Jason Hhh Date: 2010-09-07T01:32:45+09:00 Subject: Re: My First Application Jes炭s Gabriel y Gal叩n wrote: > - Variables that start with $ are global variables. Try to avoid them, > and specially in a program like this I think they are not needed. Make > them local variables, and replace the few that you use inside the > class with an instance variable that you set when creating the > instance. How can I get the variables into the class then? > - For an infinite loop: loop do {}, instead of while 1==1 > > - I can't see how you exit the loop I would like the user to be able to exit the loop by pressing a button or something like that but I'm not sure how to do that without messing up the looping. > - In the loop body, there's too much detailed processing of the > message, calling to_s, downcase and indexing several times. There's > probably a way to DRY that up, but I'm in a rush right now. Thanks for your your feedback Jesus. -- Posted via http://www.ruby-forum.com/.