From d4ab41e393097969af0343e453614ba5f4bcd43b Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 11 Mar 2014 05:16:06 +0000 Subject: test_hash.rb: refine a test * test/ruby/test_hash.rb (test_exception_in_rehash): do not run twice since this test does not use @cls. making a hash may increase memory usage and should be in preparation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_hash.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 6ef817d0c2..7cf5b8a98d 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -1208,6 +1208,8 @@ class TestHash < Test::Unit::TestCase end def test_exception_in_rehash + return unless @cls == Hash + bug9187 = '[ruby-core:58728] [Bug #9187]' prepare = <<-EOS @@ -1222,10 +1224,10 @@ class TestHash < Test::Unit::TestCase return 0 end end + h = {Foo.new => true} EOS code = <<-EOS - h = {Foo.new => true} 10_0000.times do h.rehash rescue nil end -- cgit v1.2.3