repo.or.cz
/
ruby.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git]
/
test
/
objspace
/
test_ractor.rb
blob
4901eeae2e16f87c33f559c104eb56ee48630544
1
require "test/unit"
2
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
11
12
r.take
13
r.take
14
end
15
RUBY
16
end
17
end