Skip to content

Instantly share code, notes, and snippets.

@devster
Last active December 29, 2015 13:09
Show Gist options
  • Save devster/7675162 to your computer and use it in GitHub Desktop.
Save devster/7675162 to your computer and use it in GitHub Desktop.
Detect Windows OS with ruby
require 'rbconfig'
isWindows = /mswin|win|mingw|cygwin/i === RbConfig::CONFIG['host_os']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment