diff --git a/lib/irb.rb b/lib/irb.rb index f833c3967..7e91b0f64 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -1004,9 +1004,10 @@ def run(conf = IRB.conf) prev_context = conf[:MAIN_CONTEXT] conf[:MAIN_CONTEXT] = context - save_history = !in_nested_session && History.save_history? && context.io.support_history_saving? + load_history = !in_nested_session && context.io.support_history_saving? + save_history = load_history && History.save_history? - if save_history + if load_history context.io.load_history end