1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Merge branch 'fix_hist_clear_negative_array_size' of https://github.com/tbpgr/pry into tbpgr-fix_hist_clear_negative_array_size

This commit is contained in:
Kyrylo Silin 2015-02-28 08:22:26 +02:00
commit 305e5a9b01
2 changed files with 2 additions and 0 deletions

View file

@ -57,6 +57,7 @@ class Pry
# history file. # history file.
def clear def clear
@clearer.call @clearer.call
@original_lines = 0
@history = [] @history = []
end end

View file

@ -53,6 +53,7 @@ describe Pry do
Pry.history.to_a.size.should be > 0 Pry.history.to_a.size.should be > 0
Pry.history.clear Pry.history.clear
Pry.history.to_a.size.should eq 0 Pry.history.to_a.size.should eq 0
Pry.history.original_lines.should eq 0
end end
it "doesn't affect the contents of the history file" do it "doesn't affect the contents of the history file" do