diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/readline/test_readline_history.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/readline/test_readline_history.rb b/test/readline/test_readline_history.rb index 8033a9a827..d80d432622 100644 --- a/test/readline/test_readline_history.rb +++ b/test/readline/test_readline_history.rb @@ -205,16 +205,18 @@ class Readline::TestHistory < Test::Unit::TestCase end def test_each - HISTORY.each do |s| + e = HISTORY.each do |s| assert(false) # not reachable end + assert_equal(HISTORY, e) lines = push_history(5) i = 0 - HISTORY.each do |s| + e = HISTORY.each do |s| assert_equal(HISTORY[i], s) assert_equal(lines[i], s) i += 1 end + assert_equal(HISTORY, e) end def test_each__enumerator |