1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/socket.c (sock_listen): get OpenFile just before calling

listen(2).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-12-09 23:39:57 +00:00
parent d9a56b4fee
commit bb59e412e1
3 changed files with 22 additions and 1 deletions

View file

@ -57,4 +57,18 @@ class TestBasicSocket < Test::Unit::TestCase
}
end
end
def test_listen
s = nil
log = Object.new
class << log; self end.send(:define_method, :to_int) {
s.close
2
}
inet_stream do |s|
assert_raise(IOError) {
s.listen(log)
}
end
end
end if defined?(Socket)