aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2014-02-19 17:53:13 +0100
committerXavier Noria <fxn@hashref.com>2014-02-19 17:53:13 +0100
commita26394d7481d439e41f18b5d2efd08f64daaa5d4 (patch)
treeee7ad88c29da4d30cbffe2d784c9b4b610aac540 /activesupport
parenta0d63c30cc2b7280cd2cd7ad0a76189db97f5ab7 (diff)
parent7a025b173f006adc20b04ced9157de9dc32b3ddf (diff)
downloadrails-a26394d7481d439e41f18b5d2efd08f64daaa5d4.tar.gz
rails-a26394d7481d439e41f18b5d2efd08f64daaa5d4.tar.bz2
rails-a26394d7481d439e41f18b5d2efd08f64daaa5d4.zip
Merge pull request #14102 from arthurnn/quietly_doc
Add note to silence_stream and quietly. [skip ci]
Diffstat (limited to 'activesupport')
-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