Created
August 2, 2011 17:26
-
-
Save jrgifford/1120714 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if RUBY_PLATFORM =~ /win32/ | |
puts "We're in Windows!" | |
elsif RUBY_PLATFORM =~ /linux/ | |
puts "We're in Linux!" | |
elsif RUBY_PLATFORM =~ /darwin/ | |
puts "We're in Mac OS X!" | |
elsif RUBY_PLATFORM =~ /freebsd/ | |
puts "We're in FreeBSD!" | |
elsif RUBY_PLATFORM =~ /java/ | |
puts "WHOOT JRUBY!!" | |
else | |
puts "We're running under some secret government OS. :O" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment