From e4cd319f3d6560b76dbc1c7e89aa4d790a2d1e43 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 29 Dec 2021 13:37:01 +1300 Subject: [ruby/irb] Prefer `IO#wait_readable` over `IO#select`. (https://github.com/ruby/irb/pull/323) https://github.com/ruby/irb/commit/1c03bd3373 --- lib/irb/input-method.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index f965290ac8..64276e61be 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -84,8 +84,7 @@ module IRB # # See IO#eof? for more information. def eof? - rs, = IO.select([@stdin], [], [], 0.00001) - if rs and rs[0] + if @stdin.wait_readable(0.00001) c = @stdin.getc result = c.nil? ? true : false @stdin.ungetc(c) unless c.nil? -- cgit v1.2.3