mirror of https://github.com/rails/rails
Keep Object#fork private
This commit is contained in:
parent
a273da7619
commit
f223c795e8
|
@ -18,6 +18,11 @@ module ActiveSupport
|
|||
end
|
||||
end
|
||||
|
||||
module CoreExtPrivate
|
||||
include CoreExt
|
||||
private :fork
|
||||
end
|
||||
|
||||
@pid = Process.pid
|
||||
@callbacks = []
|
||||
|
||||
|
@ -30,7 +35,7 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
def hook!
|
||||
::Object.prepend(CoreExt)
|
||||
::Object.prepend(CoreExtPrivate)
|
||||
::Kernel.singleton_class.prepend(CoreExt)
|
||||
::Process.singleton_class.prepend(CoreExt)
|
||||
end
|
||||
|
|
|
@ -12,6 +12,7 @@ class ForkTrackerTest < ActiveSupport::TestCase
|
|||
write.write "forked"
|
||||
end
|
||||
|
||||
assert_not respond_to?(:fork)
|
||||
pid = fork do
|
||||
read.close
|
||||
write.close
|
||||
|
|
Loading…
Reference in New Issue