mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue