From 91596bb719416295e02513e6071fc83824cc81af Mon Sep 17 00:00:00 2001 From: mame Date: Tue, 17 Apr 2018 08:18:57 +0000 Subject: [PATCH] Use assert(false) for the path that is expected unreachable git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/gdbm/test_gdbm.rb | 2 +- test/ruby/test_array.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/gdbm/test_gdbm.rb b/test/gdbm/test_gdbm.rb index 7f7ab6aab9..39f87d7d8a 100644 --- a/test/gdbm/test_gdbm.rb +++ b/test/gdbm/test_gdbm.rb @@ -164,7 +164,7 @@ if defined? GDBM open_db_child(dbname) do assert_raise(Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::EACCES) { GDBM.open(dbname, 0644) {|gdbm| - assert_instance_of(GDBM, gdbm) + assert(false) } } end diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 6f4999386f..8cf899cc56 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -735,7 +735,7 @@ class TestArray < Test::Unit::TestCase a = @cls[] i = 0 a.each { |e| - assert_equal(a[i], e) + assert(false, "Never get here") i += 1 } assert_equal(0, i) @@ -755,7 +755,7 @@ class TestArray < Test::Unit::TestCase a = @cls[] i = 0 a.each_index { |ind| - assert_equal(i, ind) + assert(false, "Never get here") i += 1 } assert_equal(0, i)