summaryrefslogtreecommitdiff
path: root/test/objspace
diff options
context:
space:
mode:
Diffstat (limited to 'test/objspace')
-rw-r--r--test/objspace/test_objspace.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 841a1e7c2a..1ccee02faa 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -243,6 +243,19 @@ class TestObjSpace < Test::Unit::TestCase
GC.enable
end
+ def test_trace_object_allocations_gc_stress
+ prev = GC.stress
+ GC.stress = true
+
+ ObjectSpace.trace_object_allocations{
+ proc{}
+ }
+
+ assert true # success
+ ensure
+ GC.stress = prev
+ end
+
def test_dump_flags
info = ObjectSpace.dump("foo".freeze)
assert_match(/"wb_protected":true, "old":true/, info)