aboutsummaryrefslogtreecommitdiffstats
path: root/test/objspace
diff options
context:
space:
mode:
Diffstat (limited to 'test/objspace')
-rw-r--r--test/objspace/test_objspace.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 38fd9bd46f..42dc55de9f 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -130,6 +130,7 @@ class TestObjSpace < Test::Unit::TestCase
end
def test_trace_object_allocations
+ Class.name
o0 = Object.new
ObjectSpace.trace_object_allocations{
o1 = Object.new; line1 = __LINE__; c1 = GC.count
@@ -193,6 +194,12 @@ class TestObjSpace < Test::Unit::TestCase
assert_equal(nil, ObjectSpace.allocation_sourcefile(obj3))
end
+ def test_dump_flags
+ info = ObjectSpace.dump("foo".freeze)
+ assert_match /"wb_protected":true, "old":true, "marked":true/, info
+ assert_match /"fstring":true/, info
+ end
+
def test_dump_to_default
line = nil
info = nil