From 53c13f1acaa2eb05e7f418b53f6156a4f5a773e0 Mon Sep 17 00:00:00 2001 From: Anil Wadghule Date: Mon, 26 Apr 2010 20:55:07 +0530 Subject: Use Config::CONFIG['host_os'] instead of RUBY_PLATFORM [#4477 state:resolved] Signed-off-by: Jeremy Kemper --- activesupport/lib/active_support/core_ext/kernel/reporting.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/kernel/reporting.rb') diff --git a/activesupport/lib/active_support/core_ext/kernel/reporting.rb b/activesupport/lib/active_support/core_ext/kernel/reporting.rb index ac35db6ab6..7c455f66d5 100644 --- a/activesupport/lib/active_support/core_ext/kernel/reporting.rb +++ b/activesupport/lib/active_support/core_ext/kernel/reporting.rb @@ -1,3 +1,4 @@ +require 'rbconfig' module Kernel # Sets $VERBOSE to nil for the duration of the block and back to its original value afterwards. # @@ -37,7 +38,7 @@ module Kernel # puts 'But this will' def silence_stream(stream) old_stream = stream.dup - stream.reopen(RUBY_PLATFORM =~ /mswin|mingw/ ? 'NUL:' : '/dev/null') + stream.reopen(Config::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null') stream.sync = true yield ensure -- cgit v1.2.3