Hi. I have found a bug that is present in version 1.8.0, but not in
version 1.6.8. The following should raise a Errno::EAGAIN, but does not
anymore: it waits instead.

BTW someone else reports he has the same thing _working_ on his machine.

Note: I can't find anything related to non-blocking mode in Rubicon,
despite my request (see [ruby-talk:31825] and following) to make it so,
and Matz's approval.  I will probably add unit-tests for _Ruby_'s
functionality into _my_ own Ruby programs, if I still can't get them into
Rubicon.

------------------8<--------cut-here--------8<------------------

require "socket"
require "fcntl"

class IO
  def nonblock= flag
    bit = Fcntl::O_NONBLOCK
    state = fcntl(Fcntl::F_GETFL, 0)
    fcntl(Fcntl::F_SETFL, (state & ~bit) |
      (if flag; bit else 0 end))
  end
end

foo=TCPServer.new(4242)
foo.nonblock=true
foo.accept

________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju