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

ruby-changes:67008

From: Jeremy <ko1@a...>
Date: Sat, 31 Jul 2021 21:25:05 +0900 (JST)
Subject: [ruby-changes:67008] d9ff8b3e86 (ruby_2_7): Ignore timeout option to Addrinfo.getaddrinfo

https://git.ruby-lang.org/ruby.git/commit/?id=d9ff8b3e86

From d9ff8b3e86a03499a5c6bc36fae1592914a25b9c Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Thu, 1 Jul 2021 12:08:20 -0700
Subject: Ignore timeout option to Addrinfo.getaddrinfo

This was already ignored on platforms that do not implement
getaddrinfo_a. Using getaddrinfo_a causes issues with many
calls to Addrinfo.getaddrinfo and also when using
Addrinfo.getaddrinfo with fork.

I would have updated the documentation for this, but the
option was already not documented.
---
 ext/socket/raddrinfo.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 9ec2fdc..c4de1b0 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -2496,9 +2496,7 @@ addrinfo_s_getaddrinfo(int argc, VALUE *argv, VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L2496
     rb_scan_args(argc, argv, "24:", &node, &service, &family, &socktype,
 		 &protocol, &flags, &opts);
     rb_get_kwargs(opts, &id_timeout, 0, 1, &timeout);
-    if (timeout == Qundef) {
-	timeout = Qnil;
-    }
+    timeout = Qnil;
 
     return addrinfo_list_new(node, service, family, socktype, protocol, flags, timeout);
 }
-- 
cgit v1.1


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

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