class IRB::Context

def save_history=(val)

def save_history=(val)
  IRB.conf[:SAVE_HISTORY] = val
  if val
    context = (IRB.conf[:MAIN_CONTEXT] || self)
    if context.io.support_history_saving? && !context.io.singleton_class.include?(HistorySavingAbility)
      context.io.extend(HistorySavingAbility)
    end
  end
end