Skip to content

Commit

Permalink
Allow for readonly history
Browse files Browse the repository at this point in the history
  • Loading branch information
eval committed Oct 10, 2024
1 parent d1d5414 commit 35864fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 35864fc

Please sign in to comment.