diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-25 07:36:45 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-25 07:36:45 +0000 |
commit | efdef4dbe2738ee0f77b3cc5d77132e8bd3cfb0c (patch) | |
tree | 864187ad7f7f81be49e03ded46128580a57a931f | |
parent | 45c4ae9b8b8cb2ac466f0156222c0134eff90f51 (diff) | |
download | ruby-efdef4dbe2738ee0f77b3cc5d77132e8bd3cfb0c.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/socket/socket.c | 8 | ||||
-rw-r--r-- | test/socket/test_socket.rb | 4 |
3 files changed, 11 insertions, 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. diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 43d4250b04..20631e9da7 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -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); } diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb index d3c3840464..cd19fdebf9 100644 --- a/test/socket/test_socket.rb +++ b/test/socket/test_socket.rb @@ -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 |