Zhao Yi wrote:
> I use ruby wrote a Telnet client application. It works fine until users
> want to change a user name or telnet to other host. I found all these
> failed operations are related with "su -" command or login. How can I
> let ruby deal with these? Below is my core code for this telnet client:
> 
> while 1 == 1
>   c=gets
>   tn.cmd(c){|c| print c}
>   if c=="exit"
>     break
>   end
> end
> 
> It simply get what user input and put it on the telnet server.

Can anybody help me on this? Is there a problem with "gets"? I changed 
it to "STDIN.gets" but still have such problem.
-- 
Posted via http://www.ruby-forum.com/.