lib/license_finder/platform.rb in license_finder-5.3.0 vs lib/license_finder/platform.rb in license_finder-5.4.0
- old
+ new
@@ -3,9 +3,11 @@
def self.darwin?
RUBY_PLATFORM =~ /darwin/
end
def self.windows?
- RUBY_PLATFORM =~ /mswin|cygwin|mingw/
+ # SO: What is the correct way to detect if ruby is running on Windows?,
+ # cf. https://stackoverflow.com/a/21468976/2592915
+ Gem.win_platform? || RUBY_PLATFORM =~ /mswin|cygwin|mingw/
end
end
end