Skip to content

Commit b6db783

Browse files
committed
socket.c,tcpsocket.c: improve deprecation notices
* ext/socket/socket.c: [DOC] fix grammar in deprecation notices. * ext/socket/tcpsocket.c: [DOC] ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 995fd6d commit b6db783

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

ext/socket/socket.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -984,13 +984,13 @@ sock_sockaddr(struct sockaddr *addr, socklen_t len)
984984
* Socket.gethostbyname(hostname) => [official_hostname, alias_hostnames, address_family, *address_list]
985985
*
986986
* Use Addrinfo.getaddrinfo instead.
987-
* This method is deprecated since following reasons:
987+
* This method is deprecated for the following reasons:
988988
*
989-
* - The 3rd element of result is the address family of the first address.
990-
* The address families of rest addresses are not returned.
989+
* - The 3rd element of the result is the address family of the first address.
990+
* The address families of the rest of the addresses are not returned.
991991
* - Uncommon address representation:
992992
* 4/16-bytes binary string to represent IPv4/IPv6 address.
993-
* - gethostbyname() is may take long time and it may block other threads.
993+
* - gethostbyname() may take a long time and it may block other threads.
994994
* (GVL cannot be released since gethostbyname() is not thread safe.)
995995
* - This method uses gethostbyname() function already removed from POSIX.
996996
*
@@ -1012,11 +1012,11 @@ sock_s_gethostbyname(VALUE obj, VALUE host)
10121012
* Socket.gethostbyaddr(address_string [, address_family]) => hostent
10131013
*
10141014
* Use Addrinfo#getnameinfo instead.
1015-
* This method is deprecated since following reasons:
1015+
* This method is deprecated for the following reasons:
10161016
*
10171017
* - Uncommon address representation:
10181018
* 4/16-bytes binary string to represent IPv4/IPv6 address.
1019-
* - gethostbyaddr() is may take long time and it may block other threads.
1019+
* - gethostbyaddr() may take a long time and it may block other threads.
10201020
* (GVL cannot be released since gethostbyname() is not thread safe.)
10211021
* - This method uses gethostbyname() function already removed from POSIX.
10221022
*
@@ -1164,8 +1164,8 @@ sock_s_getservbyport(int argc, VALUE *argv)
11641164
*
11651165
* Obtains address information for _nodename_:_servname_.
11661166
*
1167-
* Note that Addrinfo.getaddrinfo provides same functionality in
1168-
* object oriented style.
1167+
* Note that Addrinfo.getaddrinfo provides the same functionality in
1168+
* an object oriented style.
11691169
*
11701170
* _family_ should be an address family such as: :INET, :INET6, etc.
11711171
*

ext/socket/tcpsocket.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ tcp_sockaddr(struct sockaddr *addr, socklen_t len)
4242
* TCPSocket.gethostbyname(hostname) => [official_hostname, alias_hostnames, address_family, *address_list]
4343
*
4444
* Use Addrinfo.getaddrinfo instead.
45-
* This method is deprecated since following reasons:
45+
* This method is deprecated for the following reasons:
4646
*
47-
* - The 3rd element of result is the address family of the first address.
48-
* The address families of rest addresses are not returned.
49-
* - gethostbyname() is may take long time and it may block other threads.
47+
* - The 3rd element of the result is the address family of the first address.
48+
* The address families of the rest of the addresses are not returned.
49+
* - gethostbyname() may take a long time and it may block other threads.
5050
* (GVL cannot be released since gethostbyname() is not thread safe.)
5151
* - This method uses gethostbyname() function already removed from POSIX.
5252
*

0 commit comments

Comments
 (0)