зеркало из https://github.com/github/ruby.git
use bind_call for test-all --gc-stress
This one allocation of Method object is worth avoiding. We don't want to test UnboundMethod#bind right here. GC need not run.
This commit is contained in:
Родитель
1c999952e7
Коммит
84fc1de512
|
@ -938,7 +938,7 @@ module Test
|
||||||
define_method(:run) do |runner|
|
define_method(:run) do |runner|
|
||||||
begin
|
begin
|
||||||
gc_stress, GC.stress = GC.stress, true
|
gc_stress, GC.stress = GC.stress, true
|
||||||
oldrun.bind(self).call(runner)
|
oldrun.bind_call(self, runner)
|
||||||
ensure
|
ensure
|
||||||
GC.stress = gc_stress
|
GC.stress = gc_stress
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче