From 84fc1de5125a6f7c61609bf153f0359b3da55d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Thu, 3 Oct 2019 14:56:35 +0900 Subject: [PATCH] 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. --- tool/lib/test/unit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb index 2d5a32ed67..928c896865 100644 --- a/tool/lib/test/unit.rb +++ b/tool/lib/test/unit.rb @@ -938,7 +938,7 @@ module Test define_method(:run) do |runner| begin gc_stress, GC.stress = GC.stress, true - oldrun.bind(self).call(runner) + oldrun.bind_call(self, runner) ensure GC.stress = gc_stress end