Use EnvUtil.under_gc_stress
This commit is contained in:
parent
1fac99afda
commit
2a02b61fae
@ -244,16 +244,12 @@ class TestObjSpace < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_trace_object_allocations_gc_stress
|
||||
prev = GC.stress
|
||||
GC.stress = true
|
||||
|
||||
ObjectSpace.trace_object_allocations{
|
||||
proc{}
|
||||
}
|
||||
|
||||
EnvUtil.under_gc_stress do
|
||||
ObjectSpace.trace_object_allocations{
|
||||
proc{}
|
||||
}
|
||||
end
|
||||
assert true # success
|
||||
ensure
|
||||
GC.stress = prev
|
||||
end
|
||||
|
||||
def test_dump_flags
|
||||
|
Loading…
x
Reference in New Issue
Block a user