On Wed, 25 Oct 2006, James Edward Gray II wrote:

> HighLine has some code like this:
>
>  begin
>    require "Win32API"
>
>    if # I'm looking for the line that goes right here (see below).
>      raise LoadError, "On Cygwin, not pure Windows."
>    end
>
>    # assume we're on Windows here...
>  rescue LoadError
>    # assume we're on a Posix OS here...
>  end
>
> The problem is that Cygwin is using the Windows code and the Posix code would 
> be a better choice there.  What's a test I can use to detect Cygwin in this 
> scenario?
>
> James Edward Gray II

   posix = Process.fork{} and Process.wait rescue nil


-a
-- 
my religion is very simple.  my religion is kindness. -- the dalai lama