diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-09 23:03:40 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-09 23:03:40 +0000 |
commit | e900bba9454f8d1a75ac5aa68a15ac21e04c5340 (patch) | |
tree | 9b3a81603fcd5ca57acb85509c48779a9c4a780a /test | |
parent | b84b8adc8910a877bf9217f95b5bfb0eea268e5a (diff) | |
download | ruby-e900bba9454f8d1a75ac5aa68a15ac21e04c5340.tar.gz |
Pin weakmap references
Weak map references can't move because the st_table needs their address
as a key. But, we also need to remove T_NONE from the map so they
aren't reused.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/test_weakref.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_weakref.rb b/test/test_weakref.rb index fcf1fb8b42..f2308dbb5a 100644 --- a/test/test_weakref.rb +++ b/test/test_weakref.rb @@ -40,14 +40,14 @@ class TestWeakRef < Test::Unit::TestCase weakrefs << WeakRef.new(obj) ObjectSpace.garbage_collect end - #assert_nothing_raised(NoMethodError, bug7304) { + assert_nothing_raised(NoMethodError, bug7304) { weakrefs.each do |weak| begin weak.foo - rescue WeakRef::RefError, NoMethodError + rescue WeakRef::RefError end end - #} + } end def test_weakref_finalize |