aboutsummaryrefslogtreecommitdiffstats
path: root/test/socket
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-18 09:25:37 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-18 09:25:37 +0000
commit072b3c862406a894e611175ecb48d1899c404228 (patch)
treee9d9b878cc90d2ed89930fbd89caf15ed4c2f7b5 /test/socket
parent58ba24f8858ed4e9cae3dfe5aa8e62e0c6316878 (diff)
downloadruby-072b3c862406a894e611175ecb48d1899c404228.tar.gz
test/socket/test_unix.rb: replace sleep with select
Not sure what drugs I was on, but blindly sleeping instead of using IO#wait or IO.select to wait for data on a socket is completely wrong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket')
-rw-r--r--test/socket/test_unix.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/socket/test_unix.rb b/test/socket/test_unix.rb
index 344dcc90ad..9ca97d2998 100644
--- a/test/socket/test_unix.rb
+++ b/test/socket/test_unix.rb
@@ -388,7 +388,7 @@ class TestSocket_UNIXSocket < Test::Unit::TestCase
buf = ""
s2.send("BBBBBB", 0)
- sleep 0.1
+ IO.select([s1])
rv = s1.recv(100, 0, buf)
assert_equal buf.object_id, rv.object_id
assert_equal "BBBBBB", rv