diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-11 08:32:26 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-11 08:32:26 +0000 |
commit | b323d7d54c1f9d22799f636014a438f9da951f3f (patch) | |
tree | 331a1771e3bee4d097d3ea2bbf658d08243e70c5 /test/socket/test_socket.rb | |
parent | fade664f916d001d1e2d53cbccd132f6b039fb7d (diff) | |
download | ruby-b323d7d54c1f9d22799f636014a438f9da951f3f.tar.gz |
* 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/test_socket.rb')
-rw-r--r-- | test/socket/test_socket.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb index 9b0f896faf..590a7abed7 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) |