diff options
author | Kyrylo Silin <silin@kyrylo.org> | 2019-01-03 17:53:29 +0800 |
---|---|---|
committer | Kyrylo Silin <silin@kyrylo.org> | 2019-01-03 17:53:29 +0800 |
commit | b6264963d8feb0c92ab1b9cc75a57f599768832f (patch) | |
tree | cf0ff29bae6d9ed5d4b956e9bff2f6cea54800dd | |
parent | a4072c229cf2b5be0c2a571f350f57a4c97c33b0 (diff) | |
download | pry-inline-restore-default-behaviour.tar.gz |
-rw-r--r-- | lib/pry/history.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pry/history.rb b/lib/pry/history.rb index 72405144..79b5bd16 100644 --- a/lib/pry/history.rb +++ b/lib/pry/history.rb @@ -32,14 +32,13 @@ class Pry def push(line) return line if line.empty? || invalid_readline_line?(line) - last_line = nil begin last_line = @history[-1] rescue IndexError - return line + last_line = nil end - return line unless line == last_line + return line if line == last_line @history << line if !should_ignore?(line) && Pry.config.history.should_save |