From c919977018ed6855e94bcf32db89d69ac03d56cb Mon Sep 17 00:00:00 2001 From: Eric Kessler Date: Tue, 5 Feb 2019 22:53:22 -0500 Subject: [PATCH] [Fix #6720] Detect OS more reliably Using a different constant to determine the current operating system. --- lib/rubocop/platform.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/platform.rb b/lib/rubocop/platform.rb index ae5dcbd1f78..dfdc5146110 100644 --- a/lib/rubocop/platform.rb +++ b/lib/rubocop/platform.rb @@ -5,7 +5,7 @@ module RuboCop # on. module Platform def self.windows? - RUBY_PLATFORM =~ /cygwin|mswin|mingw|bccwin|wince|emx/ + RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/ end end end