mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use EnvUtil.under_gc_stress
This commit is contained in:
parent
1fac99afda
commit
2a02b61fae
1 changed files with 5 additions and 9 deletions
|
@ -244,16 +244,12 @@ class TestObjSpace < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_trace_object_allocations_gc_stress
|
def test_trace_object_allocations_gc_stress
|
||||||
prev = GC.stress
|
EnvUtil.under_gc_stress do
|
||||||
GC.stress = true
|
ObjectSpace.trace_object_allocations{
|
||||||
|
proc{}
|
||||||
ObjectSpace.trace_object_allocations{
|
}
|
||||||
proc{}
|
end
|
||||||
}
|
|
||||||
|
|
||||||
assert true # success
|
assert true # success
|
||||||
ensure
|
|
||||||
GC.stress = prev
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_dump_flags
|
def test_dump_flags
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue