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

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
This commit is contained in:
nobu 2014-03-11 05:16:06 +00:00
parent dc52725655
commit d4ab41e393

View file

@ -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