From: Aldric Giacomoni Date: 2009-11-21T02:14:54+09:00 Subject: Re: select only taking alternating values? Brian Candler wrote: > if gets.chomp! == "!quit" then > cleanupAndExit > else > puts gets.chomp! > end > > Note how gets is called twice. Also, I have a question... results = select([@sock, STDIN], nil, nil) for input in results[0] [...] end #for end #if Instead of doing a for loop - just do "results[0].each", which is more idiomatic. The question is, what does "select" do ? rdocs aren't helpful, and I don't understand that bit of code. -- Posted via http://www.ruby-forum.com/.