mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Keep Object#fork private
This commit is contained in:
parent
a273da7619
commit
f223c795e8
2 changed files with 7 additions and 1 deletions
|
@ -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 a new issue