From fad356c88be4f8ec8ec7d7d74c7b0b6fa5955fef Mon Sep 17 00:00:00 2001 From: Anil Wadghule Date: Thu, 8 Apr 2010 21:22:34 +0530 Subject: [PATCH] Fix for plugin not getting installed on Windows environment [#4320 state:resolved] --- .../active_support/core_ext/kernel/reporting.rb | 2 +- railties/lib/commands/runner.rb | 2 +- 2 files changed, 2 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 0f101e8..e2d5186 100644 --- a/activesupport/lib/active_support/core_ext/kernel/reporting.rb +++ b/activesupport/lib/active_support/core_ext/kernel/reporting.rb @@ -35,7 +35,7 @@ module Kernel # puts 'But this will' def silence_stream(stream) old_stream = stream.dup - stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null') + stream.reopen(RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'NUL:' : '/dev/null') stream.sync = true yield ensure diff --git a/railties/lib/commands/runner.rb b/railties/lib/commands/runner.rb index 5101283..b15ccce 100644 --- a/railties/lib/commands/runner.rb +++ b/railties/lib/commands/runner.rb @@ -18,7 +18,7 @@ ARGV.clone.options do |opts| opts.on("-h", "--help", "Show this help message.") { $stderr.puts opts; exit } - if RUBY_PLATFORM !~ /mswin/ + if RUBY_PLATFORM =~ /(:?mswin|mingw)/ opts.separator "" opts.separator "You can also use runner as a shebang line for your scripts like this:" opts.separator "-------------------------------------------------------------" -- 1.7.0.4