mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/socket.c (socket_s_ip_address_list): renamed from
socket_s_list_ip_address. [ruby-dev:37806] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
45c4ae9b8b
commit
efdef4dbe2
3 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Jan 25 16:35:44 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/socket.c (socket_s_ip_address_list): renamed from
|
||||
socket_s_list_ip_address. [ruby-dev:37806]
|
||||
|
||||
Sun Jan 25 12:17:21 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* cygwin/GNUmakefile.in (RUBYDEF): needs read-only section too.
|
||||
|
|
|
@ -1427,13 +1427,13 @@ sockaddr_obj(struct sockaddr *addr)
|
|||
|
||||
/*
|
||||
* call-seq:
|
||||
* Socket.list_ip_address => array
|
||||
* Socket.ip_address_list => array
|
||||
*
|
||||
* Returns local IP addresses as an array.
|
||||
*
|
||||
* The array contains AddrInfo objects.
|
||||
*
|
||||
* pp Socket.list_ip_address
|
||||
* pp Socket.ip_address_list
|
||||
* #=> [#<AddrInfo: 127.0.0.1>,
|
||||
* #<AddrInfo: 192.168.0.128>,
|
||||
* #<AddrInfo: ::1>,
|
||||
|
@ -1441,7 +1441,7 @@ sockaddr_obj(struct sockaddr *addr)
|
|||
*
|
||||
*/
|
||||
static VALUE
|
||||
socket_s_list_ip_address(VALUE self)
|
||||
socket_s_ip_address_list(VALUE self)
|
||||
{
|
||||
#if defined(HAVE_GETIFADDRS)
|
||||
struct ifaddrs *ifp = NULL;
|
||||
|
@ -1681,5 +1681,5 @@ Init_socket()
|
|||
rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_un", sock_s_unpack_sockaddr_un, 1);
|
||||
#endif
|
||||
|
||||
rb_define_singleton_method(rb_cSocket, "list_ip_address", socket_s_list_ip_address, 0);
|
||||
rb_define_singleton_method(rb_cSocket, "ip_address_list", socket_s_ip_address_list, 0);
|
||||
}
|
||||
|
|
|
@ -55,9 +55,9 @@ class TestSocket < Test::Unit::TestCase
|
|||
assert_raise(SocketError) { Socket.getnameinfo(["AF_UNIX", 80, "0.0.0.0"]) }
|
||||
end
|
||||
|
||||
def test_list_ip_address
|
||||
def test_ip_address_list
|
||||
begin
|
||||
list = Socket.list_ip_address
|
||||
list = Socket.ip_address_list
|
||||
rescue NotImplementedError
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue