I'm writing a software building script in Ruby for Unix and Windows.
I want to know the type of the platform that my script is running on -
whether it's Windows, Linux or MacOSX. I need to do something special
for different os.
Is there any way to get this without hacking by myself? Google gave me
nothing useful.
I'm writing a software building script in Ruby for Unix and Windows.
I want to know the type of the platform that my script is running on -
whether it's Windows, Linux or MacOSX. I need to do something special
for different os.
Is there any way to get this without hacking by myself? Google gave me
nothing useful.
I'm writing a software building script in Ruby for Unix and Windows.
I want to know the type of the platform that my script is running on -
whether it's Windows, Linux or MacOSX. I need to do something special
for different os.
Is there any way to get this without hacking by myself? Google gave me
nothing useful.
# Check that the right version of 'dot' is available.
# Unfortuately this doesn't work correctly under Windows NT,
# so we'll bypass the test under Windows
def check_diagram
return if RUBY_PLATFORM =~ /win/
# Check that the right version of 'dot' is available.
# Unfortuately this doesn't work correctly under Windows NT,
# so we'll bypass the test under Windows
def check_diagram
return if RUBY_PLATFORM =~ /win/