From 7a025b173f006adc20b04ced9157de9dc32b3ddf Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Wed, 19 Feb 2014 11:43:25 -0500 Subject: Methods silence_stream/quietly are not thread-safe [skip ci] State that on the doc. [fixes #11954] --- activesupport/lib/active_support/core_ext/kernel/reporting.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/lib/active_support') 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 -- cgit v1.2.3