summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-24 07:21:45 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-24 07:21:45 +0000
commitd8778faa2c9e6fcc4d7bce4aaf0016496efa81df (patch)
treeb917229ca112fc55dda66d063612fe475cf25a9f /test
parente1dfa8740dbecdbc88dcd7640e6b2f36ddca4ebd (diff)
don't compare struct sockaddr directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/socket/test_nonblock.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/socket/test_nonblock.rb b/test/socket/test_nonblock.rb
index 3fb31eb..ed6487b 100644
--- a/test/socket/test_nonblock.rb
+++ b/test/socket/test_nonblock.rb
@@ -16,7 +16,7 @@ class TestNonblockSocket < Test::Unit::TestCase
c = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
c.connect(serv.getsockname)
s, sockaddr = serv.accept_nonblock
- assert_equal(c.getsockname, sockaddr)
+ assert_equal(Socket.unpack_sockaddr_in(c.getsockname), Socket.unpack_sockaddr_in(sockaddr))
ensure
serv.close if serv
c.close if c
@@ -41,7 +41,7 @@ class TestNonblockSocket < Test::Unit::TestCase
}
end
s, sockaddr = serv.accept
- assert_equal(c.getsockname, sockaddr)
+ assert_equal(Socket.unpack_sockaddr_in(c.getsockname), Socket.unpack_sockaddr_in(sockaddr))
ensure
serv.close if serv
c.close if c