summaryrefslogtreecommitdiff
path: root/test/socket
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-11 08:32:26 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-11 08:32:26 +0000
commitb323d7d54c1f9d22799f636014a438f9da951f3f (patch)
tree331a1771e3bee4d097d3ea2bbf658d08243e70c5 /test/socket
parentfade664f916d001d1e2d53cbccd132f6b039fb7d (diff)
* ext/socket: New method, Socket.getifaddrs, implemented.
[ruby-core:54777] [Feature #8368] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket')
-rw-r--r--test/socket/test_socket.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 9b0f896..590a7ab 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -564,4 +564,15 @@ class TestSocket < Test::Unit::TestCase
accepted.close if accepted
sock.close if sock && ! sock.closed?
end
+
+ def test_getifaddrs
+ begin
+ list = Socket.getifaddrs
+ rescue NotImplementedError
+ return
+ end
+ list.each {|ifaddr|
+ assert_instance_of(Socket::Ifaddr, ifaddr)
+ }
+ end
end if defined?(Socket)