Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let peer/nodename be nil if protocol/service is not #1151

Merged
merged 1 commit into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion stdlib/socket/0/addrinfo.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class Addrinfo
# #=> [#<Addrinfo: 203.178.141.194:80 TCP (www.kame.net)>,
# # #<Addrinfo: [2001:200:dff:fff1:216:3eff:feb1:44d7]:80 TCP (www.kame.net)>]
#
def self.getaddrinfo: (String nodename, ?String | Integer service, ?Symbol? family, ?Symbol | Integer protocol) -> Array[Addrinfo]
def self.getaddrinfo: (String nodename, ?String | Integer | nil service, ?Symbol? family, ?Symbol | Integer protocol) -> Array[Addrinfo]
| (String? nodename, ?String | Integer service, ?Symbol? family, ?Symbol | Integer protocol) -> Array[Addrinfo]

# <!--
# rdoc-file=ext/socket/raddrinfo.c
Expand Down
1 change: 1 addition & 0 deletions stdlib/socket/0/socket.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class Socket < BasicSocket
# If Addrinfo object is preferred, use Addrinfo.getaddrinfo.
#
def self.getaddrinfo: (String peer, String | Integer | nil protocol, ?Integer | Symbol | nil family, ?Integer | Symbol | nil socktype, ?Integer | Symbol | nil protocol, ?Integer | nil flags) -> [ String, Integer, String, String, Integer, Integer, Integer ]
| (String? peer, String | Integer protocol, ?Integer | Symbol | nil family, ?Integer | Symbol | nil socktype, ?Integer | Symbol | nil protocol, ?Integer | nil flags) -> [ String, Integer, String, String, Integer, Integer, Integer ]

# <!--
# rdoc-file=ext/socket/socket.c
Expand Down