Use a File for IO with irb, see InputMethod
new(file) Class Public methods Creates a new input method object
encoding() Instance Public methods The external encoding for standard input
eof?() Instance Public methods Whether the end of this input method has been
gets() Instance Public methods Reads the next line from this input method.