ruby-changes:58093
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Thu, 3 Oct 2019 15:44:57 +0900 (JST)
Subject: [ruby-changes:58093] 84fc1de512 (master): use bind_call for test-all --gc-stress
https://git.ruby-lang.org/ruby.git/commit/?id=84fc1de512 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?= <shyouhei@r...> Date: Thu, 3 Oct 2019 14:56:35 +0900 Subject: 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. diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb index 2d5a32e..928c896 100644 --- a/tool/lib/test/unit.rb +++ b/tool/lib/test/unit.rb @@ -938,7 +938,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit.rb#L938 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/