summaryrefslogtreecommitdiff
path: root/test/objspace
diff options
context:
space:
mode:
Diffstat (limited to 'test/objspace')
-rw-r--r--test/objspace/test_objspace.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 0f0c904511..01f31cc784 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -243,6 +243,15 @@ class TestObjSpace < Test::Unit::TestCase
assert_match /"method":"#{loc.base_label}"/, info
end
+ def test_dump_special_consts
+ # [ruby-core:69692] [Bug #11291]
+ assert_equal('{}', ObjectSpace.dump(nil))
+ assert_equal('{}', ObjectSpace.dump(true))
+ assert_equal('{}', ObjectSpace.dump(false))
+ assert_equal('{}', ObjectSpace.dump(0))
+ assert_equal('{}', ObjectSpace.dump(:foo))
+ end
+
def test_dump_all
entry = /"bytesize":11, "value":"TEST STRING", "encoding":"UTF-8", "file":"-", "line":4, "method":"dump_my_heap_please", "generation":/