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:
parent
1c999952e7
commit
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user