Use a File for IO with irb, see InputMethod
The external encoding for standard input.
# File irb/input-method.rb, line 144 def encoding @io.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 131 def eof? @io.eof? end