Skip to content

Commit

Permalink
Merge pull request #43303 from etiennebarrie/dont-patch-object-for-fo…
Browse files Browse the repository at this point in the history
…rk-in-ruby3

Don't patch Object for fork in Ruby 3.0
  • Loading branch information
byroot committed Sep 24, 2021
2 parents 581aac7 + 5bf6073 commit 1268b9a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions activesupport/lib/active_support/fork_tracker.rb
Expand Up @@ -20,11 +20,7 @@ def fork(...)

module CoreExtPrivate
include CoreExt

private
def fork(...)
super
end
private :fork
end

@pid = Process.pid
Expand All @@ -40,7 +36,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)
Expand Down

0 comments on commit 1268b9a

Please sign in to comment.