From a06301b103371b0b7da8eaca26ba744961769f99 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Mon, 24 Jun 2019 11:13:09 -0700 Subject: [PATCH] Ignore history file without saving if permissions cannot be changed Fixes [Ruby Bug 13907] --- lib/irb/ext/save-history.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/irb/ext/save-history.rb b/lib/irb/ext/save-history.rb index 57ba7c1c53..37393dfb36 100644 --- a/lib/irb/ext/save-history.rb +++ b/lib/irb/ext/save-history.rb @@ -101,6 +101,8 @@ module IRB File.chmod(0600, history_file) end rescue Errno::ENOENT + rescue Errno::EPERM + return rescue raise end