diff options
author | Samuel Williams <[email protected]> | 2021-12-29 13:37:01 +1300 |
---|---|---|
committer | git <[email protected]> | 2021-12-29 09:37:05 +0900 |
commit | e4cd319f3d6560b76dbc1c7e89aa4d790a2d1e43 (patch) | |
tree | afdcfe9345500479a52e147cea34837182822d9f /lib/irb/input-method.rb | |
parent | f27eb8148f5a72bbacfebfecc7de9305471bb5c9 (diff) |
[ruby/irb] Prefer `IO#wait_readable` over `IO#select`. (https://github.com/ruby/irb/pull/323)
https://github.com/ruby/irb/commit/1c03bd3373
Diffstat (limited to 'lib/irb/input-method.rb')
-rw-r--r-- | lib/irb/input-method.rb | 3 |
1 files changed, 1 insertions, 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? |