Merge pull request #43303 from etiennebarrie/dont-patch-object-for-fork-in-ruby3

Don't patch Object for fork in Ruby 3.0
This commit is contained in:
Jean Boussier 2021-09-24 17:29:24 +02:00 committed by GitHub
commit 1268b9a17e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,11 +20,7 @@ def fork(...)
module CoreExtPrivate
include CoreExt
private
def fork(...)
super
end
private :fork
end
@pid = Process.pid
@ -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)