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
|
||||
|
||||
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…
Add table
Reference in a new issue