From d63add1039415f37ca5da1a43dec815ec1e59b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Barri=C3=A9?= Date: Fri, 24 Sep 2021 10:06:16 +0200 Subject: [PATCH 1/2] Don't override Object#fork in Ruby 3.0 It's no longer necessary with https://bugs.ruby-lang.org/issues/9573 --- activesupport/lib/active_support/fork_tracker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/fork_tracker.rb b/activesupport/lib/active_support/fork_tracker.rb index 9cebc0aa8f..08b72066f7 100644 --- a/activesupport/lib/active_support/fork_tracker.rb +++ b/activesupport/lib/active_support/fork_tracker.rb @@ -40,7 +40,7 @@ def check! def hook! if Process.respond_to?(:fork) - ::Object.prepend(CoreExtPrivate) + ::Object.prepend(CoreExtPrivate) if RUBY_VERSION < "3.0" ::Kernel.prepend(CoreExtPrivate) ::Kernel.singleton_class.prepend(CoreExt) ::Process.singleton_class.prepend(CoreExt) From 5bf607361482236b41f751e1e8597dde40ec8395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Barri=C3=A9?= Date: Fri, 24 Sep 2021 10:58:13 +0200 Subject: [PATCH 2/2] Revert "Fix ForkTracker on ruby <= 2.5.3" This reverts commit 332a2909d417fdc0f42ab7672a3cd0aaaf8752d6. --- activesupport/lib/active_support/fork_tracker.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/activesupport/lib/active_support/fork_tracker.rb b/activesupport/lib/active_support/fork_tracker.rb index 08b72066f7..e542f59631 100644 --- a/activesupport/lib/active_support/fork_tracker.rb +++ b/activesupport/lib/active_support/fork_tracker.rb @@ -20,11 +20,7 @@ def fork(...) module CoreExtPrivate include CoreExt - - private - def fork(...) - super - end + private :fork end @pid = Process.pid