summaryrefslogtreecommitdiff
path: root/test/io/wait/test_io_wait.rb
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-07 20:21:38 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-07 20:21:38 +0000
commitf23fa4b01140758c8327bf2a8f0cf48a1de75cd5 (patch)
tree6fea62c2a9227f20c07b4a4312a5442cf300e950 /test/io/wait/test_io_wait.rb
parentc9da3d68baffd4368d54f21f08d155049e9034ee (diff)
* test/io/wait/test_io_wait.rb: Linux socketpair(2) only support
AF_UNIX, but windows socketpair doesn't support it. we can't avoid platform check. sigh! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/io/wait/test_io_wait.rb')
-rw-r--r--test/io/wait/test_io_wait.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/io/wait/test_io_wait.rb b/test/io/wait/test_io_wait.rb
index 66d01907a61..876fbb87de7 100644
--- a/test/io/wait/test_io_wait.rb
+++ b/test/io/wait/test_io_wait.rb
@@ -9,7 +9,11 @@ end
class TestIOWait < Test::Unit::TestCase
def setup
- @r, @w = Socket.pair(Socket::AF_INET, Socket::SOCK_STREAM, 0)
+ if /mswin/ =~ RUBY_PLATFORM
+ @r, @w = Socket.pair(Socket::AF_INET, Socket::SOCK_STREAM, 0)
+ else
+ @r, @w = IO.pipe
+ end
end
def teardown