[Rake-devel] ~/.rake file?

Adam Salter adam.q.salter at gmail.com
Thu Aug 21 23:59:57 EDT 2008

On 16/08/2008, at 1:54 AM, Berger, Daniel wrote:

> Don't do this:
> PLATFORM =~ /win32/
> First, PLATFORM is deprecated instead of RUBY_PLATFORM. But, with the
> advent of alternative implementations like Jruby and IronRuby,
> RUBY_PLATFORM is no longer a wise approach. Jruby, for example, will
> return 'java' for the RUBY_PLATFORM, even if you're on Windows.
> Use rbconfig + host_os instead:
> require 'rbconfig'
> if Config::CONFIG['host_os'] =~ /mswin/I
> ...

Can someone please confirm that this is the "absolute" best way to  
check for Windows? There was some discussion that there would be  
different reports for MinGW...

Pending confirmation I'm going to use this method.


More information about the Rake-devel mailing list