aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2014-02-19 11:43:25 -0500
committerArthur Neves <arthurnn@gmail.com>2014-02-19 11:49:18 -0500
commit7a025b173f006adc20b04ced9157de9dc32b3ddf (patch)
treec7bdee54b31364fd7e6f92ecd32f2a79bd4bb39b /activesupport/lib/active_support/core_ext
parent5d037819ca80606638212f83de741cc2041db28f (diff)
downloadrails-7a025b173f006adc20b04ced9157de9dc32b3ddf.tar.gz
rails-7a025b173f006adc20b04ced9157de9dc32b3ddf.tar.bz2
rails-7a025b173f006adc20b04ced9157de9dc32b3ddf.zip
Methods silence_stream/quietly are not thread-safe [skip ci]
State that on the doc. [fixes #11954]
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/kernel/reporting.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/kernel/reporting.rb b/activesupport/lib/active_support/core_ext/kernel/reporting.rb
index 3b5e205244..f3f8416905 100644
--- a/activesupport/lib/active_support/core_ext/kernel/reporting.rb
+++ b/activesupport/lib/active_support/core_ext/kernel/reporting.rb
@@ -41,6 +41,8 @@ module Kernel
# end
#
# puts 'But this will'
+ #
+ # This method is not thread-safe.
def silence_stream(stream)
old_stream = stream.dup
stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
@@ -100,6 +102,8 @@ module Kernel
# Silences both STDOUT and STDERR, even for subprocesses.
#
# quietly { system 'bundle install' }
+ #
+ # This method is not thread-safe.
def quietly
silence_stream(STDOUT) do
silence_stream(STDERR) do