Skip to content

Commit

Permalink
[Fix rubocop#6720] Detect OS more reliably
Browse files Browse the repository at this point in the history
Using a different constant to determine the current operating system.
  • Loading branch information
enkessler committed Feb 6, 2019
1 parent 9af7afe commit c919977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/platform.rb
Expand Up @@ -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

0 comments on commit c919977

Please sign in to comment.