diff options
-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 |