module IRB

def self.start_session(binding)

def self.start_session(binding)
  unless @__initialized
    args = ARGV.dup
    ARGV.replace([])
    IRB.setup(nil)
    ARGV.replace(args)
    @__initialized = true
  end
  workspace = WorkSpace.new(binding)
  irb = Irb.new(workspace)
  @CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
  @CONF[:MAIN_CONTEXT] = irb.context
  trap("SIGINT") do
    irb.signal_handle
  end
  catch(:IRB_EXIT) do
    irb.eval_input
  end
end