зеркало из https://github.com/github/ruby.git
Fix indentation in test_after_gc_start_hook_with_GC_stress
This commit is contained in:
Родитель
ac0a8c6230
Коммит
77db37813a
|
@ -66,15 +66,15 @@ class TestTracepointObj < Test::Unit::TestCase
|
|||
count = 0
|
||||
hook = proc {count += 1}
|
||||
def run(hook)
|
||||
stress, GC.stress = GC.stress, false
|
||||
Bug.after_gc_start_hook = hook
|
||||
begin
|
||||
GC.stress = true
|
||||
3.times {Object.new}
|
||||
ensure
|
||||
GC.stress = stress
|
||||
Bug.after_gc_start_hook = nil
|
||||
end
|
||||
stress, GC.stress = GC.stress, false
|
||||
Bug.after_gc_start_hook = hook
|
||||
begin
|
||||
GC.stress = true
|
||||
3.times {Object.new}
|
||||
ensure
|
||||
GC.stress = stress
|
||||
Bug.after_gc_start_hook = nil
|
||||
end
|
||||
end
|
||||
run(hook)
|
||||
puts count
|
||||
|
|
Загрузка…
Ссылка в новой задаче