Note that you may need to
touch abc
before running the tests (once), and that sometimes they hang on accept, so you may need to do a ctrl+c to force it to progress.
Also on linux accept hangs when there are no available fd's--I'm not sure if that's expected or not.
With Linux and OS X and 1.9 the tests all work, besides that. Nice job.
=begin
There are two problems here, one being that select doesn't select on all fd's you pass, the other being that an accept call with no remaining fd's available will hang forever [uninterruptibly], in windows only, not linux.
Here's an example:
require 'socket'
require 'tempfile'
s = TCPServer.new '0.0.0.0', 4000
c = TCPSocket.new '127.0.0.1', 4000
fds = []
begin
loop { fds << Tempfile.new('test')}
rescue Exception
end
puts "accepting"
s.accept # should raise