diff options
author | Anil Wadghule <anildigital@gmail.com> | 2010-04-26 20:55:07 +0530 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-26 11:12:52 -0700 |
commit | 53c13f1acaa2eb05e7f418b53f6156a4f5a773e0 (patch) | |
tree | e6a0a66b7f4af519f03a190db5443b2e6d11fcce /activesupport/lib/active_support | |
parent | e813ad2a42549e308a69fd9473f1b9ed531a0d7e (diff) | |
download | rails-53c13f1acaa2eb05e7f418b53f6156a4f5a773e0.tar.gz rails-53c13f1acaa2eb05e7f418b53f6156a4f5a773e0.tar.bz2 rails-53c13f1acaa2eb05e7f418b53f6156a4f5a773e0.zip |
Use Config::CONFIG['host_os'] instead of RUBY_PLATFORM [#4477 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/kernel/reporting.rb | 3 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/isolation.rb | 3 |
2 files changed, 4 insertions, 2 deletions
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 diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb index 9507dbf473..69df399cde 100644 --- a/activesupport/lib/active_support/testing/isolation.rb +++ b/activesupport/lib/active_support/testing/isolation.rb @@ -1,3 +1,4 @@ +require 'rbconfig' module ActiveSupport module Testing class RemoteError < StandardError @@ -33,7 +34,7 @@ module ActiveSupport module Isolation def self.forking_env? - !ENV["NO_FORK"] && RUBY_PLATFORM !~ /mswin|mingw|java/ + !ENV["NO_FORK"] && ((Config::CONFIG['host_os'] !~ /mswin|mingw/) && (RUBY_PLATFORM !~ /java/)) end def self.included(base) |