Use a File for IO with irb, see InputMethod
The external encoding for standard input.
# File irb/input-method.rb, line 164 def encoding @external_encoding end
Whether the end of this input method has been reached, returns true
if there is no more data to read.
See IO#eof? for more information.
# File irb/input-method.rb, line 151 def eof? @io.closed? || @io.eof? end