summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/socket.c8
-rw-r--r--test/socket/test_socket.rb4
3 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 05fff4f..3037125 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 43d4250..20631e9 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 d3c3840..cd19fde 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