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:
commit
1268b9a17e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user