4 OS_VERSION = if RUBY_PLATFORM =~ /mswin|win32|mingw|bccwin|cygwin/
6 # Confirm that all of these Windows environments actually have access
7 # to the `ver` command.
8 `ver`.sub(/\s*\[Version\s*/, '/').sub(']', '').strip
9 elsif RUBY_PLATFORM =~ /darwin/i
10 "Mac OS X/#{`sw_vers -productVersion`}"
12 `uname -sr`.sub(' ', '/')