From: Marc Heiler Date: 2012-10-28T19:59:39+09:00 Subject: How to restore input from within a loop or similar? Hi, I currently have a pseudo irc client. I use something like this here to get what I type: select( [$stdin], nil, nil, 1.5 ) I do this from within a big loop that reads in user input, like so: loop { user_input = $stdin.gets.chomp case user_input when 'test' puts 'Just testing...' when 'irc' # here the code to start the IRC client, which has that select() call end break if user_input == 'quit' } My question is, when I input 'irc', how do I stop only that select() call, and return control back to the user_input loop? Right now, if I use "exit" within the IrcClient class, I stop the whole program, but I only want to stop the Irc client -- Posted via http://www.ruby-forum.com/.