diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-11 05:16:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-11 05:16:06 +0000 |
commit | d4ab41e393097969af0343e453614ba5f4bcd43b (patch) | |
tree | 662cc24b2b4d6734e081608b75e8a376084cc7b8 /test/ruby/test_hash.rb | |
parent | dc5272565515df919e57ad8a9bcb58fdac4c553b (diff) | |
download | ruby-d4ab41e393097969af0343e453614ba5f4bcd43b.tar.gz |
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
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r-- | test/ruby/test_hash.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |