From eab2f44b4d02ee5e468a41d50275b6506adf83d6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 23 Jan 2022 21:00:27 +0000 Subject: use IO#wait_readable consistently Since Ruby 2.3, it no longer checks FIONREAD, and we require Ruby 2.3+ nowadays, so drop our IO.select-based workarounds. --- lib/dtas/unix_client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/dtas/unix_client.rb b/lib/dtas/unix_client.rb index 8aa953c..71f833c 100644 --- a/lib/dtas/unix_client.rb +++ b/lib/dtas/unix_client.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2020 all contributors +# Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true require_relative '../dtas' @@ -39,7 +39,7 @@ class DTAS::UNIXClient # :nodoc: end def res_wait(timeout = nil) - IO.select([@to_io], nil, nil, timeout) + @to_io.wait_readable(timeout) nr = @to_io.nread nr > 0 or raise EOFError, "unexpected EOF from server" @to_io.recv(nr) -- cgit v1.2.3-24-ge0c7