[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git] / test / objspace / test_ractor.rb
blob4901eeae2e16f87c33f559c104eb56ee48630544
1 require "test/unit"
3 class TestObjSpaceRactor < Test::Unit::TestCase
4   def test_tracing_does_not_crash
5     assert_ractor(<<~RUBY, require: 'objspace')
6       ObjectSpace.trace_object_allocations do
7         r = Ractor.new do
8           obj = 'a' * 1024
9           Ractor.yield obj
10         end
12         r.take
13         r.take
14       end
15     RUBY
16   end
17 end