Use EnvUtil.under_gc_stress
This commit is contained in:
parent
1fac99afda
commit
2a02b61fae
@ -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…
x
Reference in New Issue
Block a user