summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-27 20:43:31 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-27 20:43:31 +0000
commitb908b2d69edf375868e1a67dab8fe8aede67ef65 (patch)
treeb771ab17e8343e456121a144dfc927bae6f2dfc8 /test
parentb6f5c225679980f595f0182f2727bcd925be6370 (diff)
merge revision(s) 52128,52133: [Backport #11271]
* test/objspace/test_objspace.rb (test_trace_object_allocations_start_stop_clear): clear object allocation table first to get rid of erronous detection for obj3. [ruby-dev:49095] [Bug #11271] allocation table first to get rid of erroneous detection for obj3. because it is only delegation function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@52769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/objspace/test_objspace.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 868a46e543..d8aac81c31 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -162,6 +162,8 @@ class TestObjSpace < Test::Unit::TestCase
end
def test_trace_object_allocations_start_stop_clear
+ ObjectSpace.trace_object_allocations_clear # clear object_table to get rid of erroneous detection for obj3
+ GC.disable # suppress potential object reuse. see [Bug #11271]
begin
ObjectSpace.trace_object_allocations_start
begin
@@ -192,6 +194,8 @@ class TestObjSpace < Test::Unit::TestCase
assert_equal(nil, ObjectSpace.allocation_sourcefile(obj1))
assert_equal(nil, ObjectSpace.allocation_sourcefile(obj2))
assert_equal(nil, ObjectSpace.allocation_sourcefile(obj3))
+ ensure
+ GC.enable
end
def test_dump_flags