[前][次][番号順一覧][スレッド一覧]

ruby-changes:48597

From: stomar <ko1@a...>
Date: Wed, 8 Nov 2017 05:57:38 +0900 (JST)
Subject: [ruby-changes:48597] stomar:r60709 (trunk): socket.c, tcpsocket.c: improve deprecation notices

stomar	2017-11-08 05:13:00 +0900 (Wed, 08 Nov 2017)

  New Revision: 60709

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60709

  Log:
    socket.c,tcpsocket.c: improve deprecation notices
    
    * ext/socket/socket.c: [DOC] fix grammar in deprecation notices.
    * ext/socket/tcpsocket.c: [DOC] ditto.

  Modified files:
    trunk/ext/socket/socket.c
    trunk/ext/socket/tcpsocket.c
Index: ext/socket/socket.c
===================================================================
--- ext/socket/socket.c	(revision 60708)
+++ ext/socket/socket.c	(revision 60709)
@@ -984,13 +984,13 @@ sock_sockaddr(struct sockaddr *addr, soc https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L984
  *   Socket.gethostbyname(hostname) => [official_hostname, alias_hostnames, address_family, *address_list]
  *
  * Use Addrinfo.getaddrinfo instead.
- * This method is deprecated since following reasons:
+ * This method is deprecated for the following reasons:
  *
- * - The 3rd element of result is the address family of the first address.
- *   The address families of rest addresses are not returned.
+ * - The 3rd element of the result is the address family of the first address.
+ *   The address families of the rest of the addresses are not returned.
  * - Uncommon address representation:
  *   4/16-bytes binary string to represent IPv4/IPv6 address.
- * - gethostbyname() is may take long time and it may block other threads.
+ * - gethostbyname() may take a long time and it may block other threads.
  *   (GVL cannot be released since gethostbyname() is not thread safe.)
  * - This method uses gethostbyname() function already removed from POSIX.
  *
@@ -1012,11 +1012,11 @@ sock_s_gethostbyname(VALUE obj, VALUE ho https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L1012
  *   Socket.gethostbyaddr(address_string [, address_family]) => hostent
  *
  * Use Addrinfo#getnameinfo instead.
- * This method is deprecated since following reasons:
+ * This method is deprecated for the following reasons:
  *
  * - Uncommon address representation:
  *   4/16-bytes binary string to represent IPv4/IPv6 address.
- * - gethostbyaddr() is may take long time and it may block other threads.
+ * - gethostbyaddr() may take a long time and it may block other threads.
  *   (GVL cannot be released since gethostbyname() is not thread safe.)
  * - This method uses gethostbyname() function already removed from POSIX.
  *
@@ -1164,8 +1164,8 @@ sock_s_getservbyport(int argc, VALUE *ar https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L1164
  *
  * Obtains address information for _nodename_:_servname_.
  *
- * Note that Addrinfo.getaddrinfo provides same functionality in
- * object oriented style.
+ * Note that Addrinfo.getaddrinfo provides the same functionality in
+ * an object oriented style.
  *
  * _family_ should be an address family such as: :INET, :INET6, etc.
  *
Index: ext/socket/tcpsocket.c
===================================================================
--- ext/socket/tcpsocket.c	(revision 60708)
+++ ext/socket/tcpsocket.c	(revision 60709)
@@ -42,11 +42,11 @@ tcp_sockaddr(struct sockaddr *addr, sock https://github.com/ruby/ruby/blob/trunk/ext/socket/tcpsocket.c#L42
  *   TCPSocket.gethostbyname(hostname) => [official_hostname, alias_hostnames, address_family, *address_list]
  *
  * Use Addrinfo.getaddrinfo instead.
- * This method is deprecated since following reasons:
+ * This method is deprecated for the following reasons:
  *
- * - The 3rd element of result is the address family of the first address.
- *   The address families of rest addresses are not returned.
- * - gethostbyname() is may take long time and it may block other threads.
+ * - The 3rd element of the result is the address family of the first address.
+ *   The address families of the rest of the addresses are not returned.
+ * - gethostbyname() may take a long time and it may block other threads.
  *   (GVL cannot be released since gethostbyname() is not thread safe.)
  * - This method uses gethostbyname() function already removed from POSIX.
  *

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]