diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/objspace/test_objspace.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index e47917030a..40f1c73a51 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -164,6 +164,15 @@ class TestObjSpace < Test::Unit::TestCase end; end + def test_trace_object_allocations_stop_first + assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") + begin; + require "objspace" + # Make sure stoping before the tracepoints are initialized doesn't raise. See [Bug #17020] + ObjectSpace.trace_object_allocations_stop + end; + end + def test_trace_object_allocations ObjectSpace.trace_object_allocations_clear # clear object_table to get rid of erroneous detection for c0 Class.name |