diff options
Diffstat (limited to 'test/objspace/test_ractor.rb')
-rw-r--r-- | test/objspace/test_ractor.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/objspace/test_ractor.rb b/test/objspace/test_ractor.rb new file mode 100644 index 0000000000..b7008ea731 --- /dev/null +++ b/test/objspace/test_ractor.rb @@ -0,0 +1,17 @@ +require "test/unit" + +class TestObjSpaceRactor < Test::Unit::TestCase + def test_tracing_does_not_crash + assert_ractor(<<~RUBY, require: 'objspace') + ObjectSpace.trace_object_allocations do + r = Ractor.new do + obj = 'a' * 1024 + Ractor.yield obj + end + + r.take + r.take + end + RUBY + end +end |