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?