Non-blocking TCPSocket.gets

Tim Bates news@bates.id.au writes:

Is there a way to find out if there is any data waiting on a TCPSocket?

What about select?