diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-07 18:26:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-07 18:26:12 +0000 |
commit | 5e19f7901d68c6b5caadbb4beb2d82c1f2883b4f (patch) | |
tree | ba7f8844d21df77edd40d61a35761b4c45414eaa /test/socket | |
parent | 46d258cff5abf1cdc087643e47145cdfe2012459 (diff) | |
download | ruby-5e19f7901d68c6b5caadbb4beb2d82c1f2883b4f.tar.gz ruby-5e19f7901d68c6b5caadbb4beb2d82c1f2883b4f.tar.xz ruby-5e19f7901d68c6b5caadbb4beb2d82c1f2883b4f.zip |
* test/io/nonblock/test_flush.rb (TestIONonblock#test_flush): write
operation ignores EAGAIN.
* test/ruby/test_super.rb (TestSuper#test_define_method): test for
super from proc. [ruby-core:03856]
* test/socket/test_tcp.rb (TestTCPSocket#test_recvfrom): make
execution order more precise.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket')
-rw-r--r-- | test/socket/test_tcp.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb index e05962198..8d55c011c 100644 --- a/test/socket/test_tcp.rb +++ b/test/socket/test_tcp.rb @@ -7,17 +7,22 @@ end class TestTCPSocket < Test::Unit::TestCase def test_recvfrom # [ruby-dev:24705] + c = s = nil svr = TCPServer.new("localhost", 0) Thread.new { - svr.accept.print("x"*0x1000) + c = svr.accept + Thread.pass until s + c.print("x"*0x1000) } addr = svr.addr sock = TCPSocket.open(addr[2], addr[1]) Thread.new { - Thread.pass + Thread.pass until c + Thread.critical = true ObjectSpace.each_object(String) {|s| - s.replace "a" if s.length == 0x10000 + s.replace "a" if s.length == 0x10000 and !s.frozen? } + Thread.critical = false } assert_raise(RuntimeError, SocketError) { sock.recvfrom(0x10000) |