From 1b512183be40ba8c5b785fbec4da38b40e60450e Mon Sep 17 00:00:00 2001 From: kouji Date: Mon, 22 Sep 2008 17:13:25 +0000 Subject: * test/readline/test_readline_history.rb (Readline::TestHistory#test_each): checked return value. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/readline/test_readline_history.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/readline/test_readline_history.rb b/test/readline/test_readline_history.rb index 8033a9a82..d80d43262 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 -- cgit