more reliable platform recognition
@@ -180,9 +180,11 @@ module RbConfig
#CONFIG["host_os"] = "darwin16.3.0"
-if ( System.get_property('platform') == 'WINDOWS' ) || ( System.get_property('platform') == 'WINDOWS_DESKTOP' )
+ platform = System.get_property('platform')
+
+ if ( (platform=~/WINDOWS/) || (platform=~/(win|w)32$/) )
CONFIG["host_os"] = "mingw32"
- elsif ( System.get_property('platform') == 'APPLE' )
+ elsif ( (platform=~/APPLE/) || (platform=~/darwin/) )
CONFIG["host_os"] = "darwin"
else
CONFIG["host_os"] = "linux"
