Today I’m finishing the code cleanup for my latest Rails plugin (will be soon released) and I want to execute some rake tasks, only if the OS supports certain system calls.

The following snippet helps to check the current platform.

# (c) 2007 Luca Guidi (www.lucaguidi.com) - Released under MIT License. # This code was inspired by Prototype rake test tasks. require 'webrick'
class OperatingSystem
  class  </code>