class IRB::Irb

def suspend_input_method(input_method)

for more information.
Used by the irb commands +source+ and +irb_load+, see IRB@IRB+Sessions

Context#io.
Evaluates the given block using the given +input_method+ as the
def suspend_input_method(input_method)
  back_io = @context.io
  @context.instance_eval{@io = input_method}
  begin
    yield back_io
  ensure
    @context.instance_eval{@io = back_io}
  end
end