summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--lib/pry/history.rb3
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 332a5993..605ac0b5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
### HEAD
+* Provide better fakefs integration by default. ([#1631](https://github.com/pry/pry/1631))
* Add text helpers for background colors ([#1624](https://github.com/pry/pry/pull/1624))
* Fix string literal methods completion. ([#1590](https://github.com/pry/pry/pull/1590))
* Make sure Pry::WrappedModule::Candidate#source_location returns non-nil value when `.name` has
diff --git a/lib/pry/history.rb b/lib/pry/history.rb
index 72cbc81c..9bdedcc2 100644
--- a/lib/pry/history.rb
+++ b/lib/pry/history.rb
@@ -2,6 +2,7 @@ class Pry
# The History class is responsible for maintaining the user's input history,
# both internally and within Readline.
class History
+ OPEN_SYSERRORS = [Errno::EACCES, Errno::ENOENT]
attr_accessor :loader, :saver, :pusher, :clearer
# @return [Fixnum] Number of lines in history when Pry first loaded.
@@ -136,7 +137,7 @@ class Pry
file.sync = true
end
end
- rescue Errno::EACCES
+ rescue *OPEN_SYSERRORS
warn 'History not saved; unable to open your history file for writing.'
@history_file = false
end