# The Proper way to detect the Windows Platform in Ruby

**URL:** <https://www.ruby-forum.com/t/the-proper-way-to-detect-the-windows-platform-in-ruby/185020>\
**Category:** IronRuby\
**Created:** [March 11, 2010, 9:39pm UTC](https://www.ruby-forum.com/t/the-proper-way-to-detect-the-windows-platform-in-ruby/185020 "2010-03-11T21:39:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [March 11, 2010, 9:39pm UTC](https://www.ruby-forum.com/t/the-proper-way-to-detect-the-windows-platform-in-ruby/185020/1 "2010-03-11T21:39:25Z")

</div>

Thought I’d share this with everyone:

[http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/](http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/)

> From one of the JRuby core team.  
> [http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/](http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/)

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [March 11, 2010, 10:24pm UTC](https://www.ruby-forum.com/t/the-proper-way-to-detect-the-windows-platform-in-ruby/185020/2 "2010-03-11T22:24:30Z")

</div>

I’ve been using ENV[‘OS’] == ‘Windows\_NT’ to detect windows relaibly

On Thursday, March 11, 2010, Will G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thought I’d share this with everyone:  
> [EmptyWay.com is for sale | HugeDomains](http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/)
> 
> From one of the JRuby core team.Â [http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/](http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/)–  
> Will G.  
> [http://hotgazpacho.org/](http://hotgazpacho.org/)

## –

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C. - Mob: +32.486.787.582  
Web: [http://whiterabbitconsulting.eu](http://whiterabbitconsulting.eu) - [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([IronRuby in Action - Ivan Porto Carrero and Adam Burmister | Manning](http://manning.com/carrero))  
Microsoft IronRuby/C# MVP

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [March 11, 2010, 11:02pm UTC](https://www.ruby-forum.com/t/the-proper-way-to-detect-the-windows-platform-in-ruby/185020/3 "2010-03-11T23:02:34Z")

</div>

Yikes!

Well, those are all OSS projects. We should fork them, fix them, and  
send  
pull requests/patches 😉

–  
Will G.  
[http://hotgazpacho.org/](http://hotgazpacho.org/)

On Thu, Mar 11, 2010 at 4:39 PM, Tomas M. \<

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [March 12, 2010, 1:13am UTC](https://www.ruby-forum.com/t/the-proper-way-to-detect-the-windows-platform-in-ruby/185020/4 "2010-03-12T01:13:41Z")

</div>

I’ve been trying to writing a lot of dubious cross platform command line  
tools with ruby lately and have wanted to isolate the detection of  
various  
platform specific capabilities (playing audio files, accessing the  
clipboard, launching a browser) to a gem:

> **[GitHub - markryall/splat: cross platform adapter for various things such as...](https://github.com/markryall/splat)**
>
> cross platform adapter for various things such as application launcher and clipboard - GitHub - markryall/splat: cross platform adapter for various things such as application launcher and clipboard

It is by far the most hideous and embarassing gem ever - basically one  
gigantic case statement. I should have called it the picture of dorian  
gray. I’d briefly looked at ironruby 1.0 rc2 but couldn’t see an easy  
way  
to characterise it and haven’t got to jruby or linux at all yet.

I noticed that someone else has attempted to create something similar  
with  
sane (the homepage link from [sane | RubyGems.org | your community gem host](http://rubygems.org/gems/sane) is broken so  
i’m  
not sure where the source really is).

It’d be awesome for the existence of such things to be unnecessary.

Mark.

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [March 11, 2010, 10:40pm UTC](https://www.ruby-forum.com/t/the-proper-way-to-detect-the-windows-platform-in-ruby/185020/5 "2010-03-11T22:40:19Z")

</div>

Sure, using RUBY\_PLATFORM is not good. However if you search thru Ruby  
gems it’s used all over the place ☹  
So until at least 90% of Ruby apps detect OS specific features properly  
we need to keep RUBY\_PLATFORM set to win32/darwin/linux depending on the  
underlying OS. I guess some gems might be broken on JRuby on Windows  
since they don’t check for “java”.

ruby-1.8.6p368\lib\ruby\1.8\ftools.rb(103): if RUBY\_PLATFORM =~  
/djgpp|(cyg|ms|bcc)win|mingw/ and file? to  
ruby-1.8.6p368\lib\ruby\1.8\drb\extservm.rb(89): if RUBY\_PLATFORM  
=~ /mswin32/ && /NT/ =~ ENV[“OS”]  
ruby-1.8.6p368\lib\ruby\1.8\rdoc\options.rb(547): return if  
RUBY\_PLATFORM =~ /win/  
ruby-1.8.6p368\lib\ruby\1.8\soap\streamHandler.rb(23):  
RUBY\_VERSION\_STRING = “ruby #{ RUBY\_VERSION } (#{ RUBY\_RELEASE\_DATE })  
[#{ RUBY\_PLATFORM }]”  
ruby-1.8.6p368\lib\ruby\1.8\xmlrpc\server.rb(643): if RUBY\_PLATFORM  
=~ /mingw|mswin32/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\actionpack-2.3.5\test\controller\layout\_test.rb(201):unless  
RUBY\_PLATFORM =~ /(:?mswin|mingw|bccwin)/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\activesupport-2.3.5\lib\active\_support\core\_ext\kernel\reporting.rb(38):  
stream.reopen(RUBY\_PLATFORM =~ /mswin/ ? ‘NUL:’ : ‘/dev/null’)  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\activesupport-2.3.5\lib\active\_support\xml\_mini\jdom.rb(1):raise  
“JRuby is required to use the JDOM backend for XmlMini” unless  
RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\activesupport-3.0.pre\lib\active\_support\core\_ext\kernel\reporting.rb(40):  
stream.reopen(RUBY\_PLATFORM =~ /mswin/ ? ‘NUL:’ : ‘/dev/null’)  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\activesupport-3.0.pre\lib\active\_support\testing\isolation.rb(36):  
!ENV[“NO\_FORK”] && RUBY\_PLATFORM !~ /mswin|mingw|java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\activesupport-3.0.pre\lib\active\_support\xml\_mini\jdom.rb(1):raise  
“JRuby is required to use the JDOM backend for XmlMini” unless  
RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\addressable-2.0.2\Rakefile(41):RCOV\_ENABLED  
= (RUBY\_PLATFORM != “java” && RUBY\_VERSION =~ /^1.8/)  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\addressable-2.0.2\Rakefile(48):WINDOWS  
= (RUBY\_PLATFORM =~ /mswin|win32|mingw|bccwin|cygwin/) rescue false  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\addressable-2.0.2\spec\addressable\uri\_spec.rb(3010):  
if RUBY\_PLATFORM =~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\addressable-2.0.2\spec\addressable\uri\_spec.rb(3017):  
if RUBY\_PLATFORM =~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\addressable-2.1.0\Rakefile(40):RCOV\_ENABLED  
= (RUBY\_PLATFORM != “java” && RUBY\_VERSION =~ /^1.8/)  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\addressable-2.1.0\Rakefile(47):WINDOWS  
= (RUBY\_PLATFORM =~ /mswin|win32|mingw|bccwin|cygwin/) rescue false  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\addressable-2.1.0\spec\addressable\uri\_spec.rb(3128):  
if RUBY\_PLATFORM =~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\addressable-2.1.0\spec\addressable\uri\_spec.rb(3135):  
if RUBY\_PLATFORM =~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\cgi\_multipart\_eof\_fix-2.5.0\lib\cgi\_multipart\_eof\_fix.rb(8):if  
version [0] \< 2 and version [1] \< 9 and version [2] \< 6 and  
RUBY\_PLATFORM !~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\cgi\_multipart\_eof\_fix-2.5.0\test\test\_cgi\_multipart\_eof\_fix.rb(18):IS\_VULNERABLE  
= (version [0] \< 2 and version [1] \< 9 and version [2] \< 6 and  
RUBY\_PLATFORM !~ /java/)  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\cucumber-0.3.94\gem\_tasks\environment.rake(2):  
RUBY\_APP = if RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\cucumber-0.3.97\gem\_tasks\environment.rake(2):  
RUBY\_APP = if RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\data\_objects-0.9.12\Rakefile(9):JRUBY  
= RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\data\_objects-0.9.12\lib\data\_objects\connection.rb(19):  
warn ‘JNDI URLs (connection strings) are only for use with JRuby’ unless  
RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\data\_objects-0.9.12\lib\data\_objects\connection.rb(22):  
warn ‘JDBC URLs (connection strings) are only for use with JRuby’ unless  
RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\dm-adjust-0.9.11\Rakefile(5):JRUBY  
= RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\dm-core-0.9.11\tasks\install.rb(1):WIN32  
= (RUBY\_PLATFORM =~ /win32|mingw|bccwin|cygwin/) rescue nil  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\dm-serializer-0.9.11\Rakefile(5):JRUBY  
= RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\dm-types-0.9.11\Rakefile(5):JRUBY  
= RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\dm-validations-0.9.11\Rakefile(5):JRUBY  
= RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\extlib-0.9.12\Rakefile(13):JRUBY  
= RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\extlib-0.9.12\spec\pooling\_spec.rb(61):  
pool\_size = if RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\gem\_plugin-0.2.3\resources\Rakefile(35):  
p.need\_tar = true if RUBY\_PLATFORM !~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\haml-2.2.2\Rakefile(67): sudo =  
RUBY\_PLATFORM =~ /win32/ ? ‘’ : ‘sudo’  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\haml-2.2.2\Rakefile(68): gem =  
RUBY\_PLATFORM =~ /java/ ? ‘jgem’ : ‘gem’  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\highline-1.5.1\lib\highline\system\_extensions.rb(21):  
raise LoadError, “Cygwin is a Posix OS.” if RUBY\_PLATFORM =~  
/\bcygwin\b/i  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\highline-1.5.1\lib\highline\system\_extensions.rb(184):  
if /solaris/ =~ RUBY\_PLATFORM and  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\hoe-2.3.3\lib\hoe.rb(91):  
WINDOZE = /mswin|mingw/ =~ RUBY\_PLATFORM unless defined? WINDOZE  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\merb-action-args-1.0.12\lib\merb-action-args\get\_args.rb(1):unless  
RUBY\_PLATFORM == “java”  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\merb-core-1.0.12\Rakefile(408):  
spec\_cmd = (RUBY\_PLATFORM =~ /java/) ? “jruby -S spec” : “spec”  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\merb-core-1.0.12\lib\merb-core.rb(778):  
RUBY\_PLATFORM =~ Merb::Const::JAVA\_PLATFORM\_REGEXP  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\merb-core-1.0.12\lib\merb-core.rb(783):  
RUBY\_PLATFORM =~ Merb::Const::WIN\_PLATFORM\_REGEXP  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mime-types-1.16\lib\mime\types.rb(494):  
system? and (RUBY\_PLATFORM =~ @system)  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\mongrel.gemspec(70):#  
if RUBY\_PLATFORM !~ /mswin|mingw|java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\mongrel.gemspec(167):#  
unless RUBY\_PLATFORM =~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\mongrel.gemspec(185):#  
sh(“rake java package”) unless RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\mongrel.gemspec(188):#

# sub\_project(“mongrel\_service”, :package) if RUBY\_PLATFORM =~ /mswin/

ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\mongrel.gemspec(189):#

# sh(“rake mswin package”) unless RUBY\_PLATFORM =~ /mswin/

ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\mongrel.gemspec(207):#  
sub\_project(“mongrel\_service”, :install) if RUBY\_PLATFORM =~  
/mswin|mingw/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\mongrel.gemspec(219):#  
sub\_project(“mongrel\_service”, :uninstall) if RUBY\_PLATFORM =~  
/mswin|mingw/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\mongrel.gemspec(232):#  
sub\_project(“mongrel\_service”, :clean) if RUBY\_PLATFORM =~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\bin\mongrel\_rails(140):  
if RUBY\_PLATFORM !~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\lib\mongrel\configurator.rb(84):  
if RUBY\_PLATFORM !~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\lib\mongrel\configurator.rb(188):  
if RUBY\_PLATFORM !~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\lib\mongrel\configurator.rb(369):  
if RUBY\_PLATFORM !~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\lib\mongrel\rails.rb(176):  
if RUBY\_PLATFORM !~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\test\testhelp.rb(78):  
result = RUBY\_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\net-ssh-2.0.13\Rakefile(36):  
p.need\_tar = true if RUBY\_PLATFORM !~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\net-ssh-2.0.13\lib\net\ssh\authentication\agent.rb(6):require  
‘net/ssh/authentication/pageant’ if File::ALT\_SEPARATOR &&  
!(RUBY\_PLATFORM =~ /java/)  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\ParseTree-3.0.4\lib\parse\_tree.rb(295):  
builder.add\_compile\_flags “-Werror” unless RUBY\_PLATFORM =~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\ParseTree-3.0.4\lib\parse\_tree.rb(1123):  
extern\_mode = RUBY\_PLATFORM =~ /mswin/ ? ‘RUBY\_EXTERN’ : ‘extern’  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\pathname2-1.6.2\CHANGES(28):\*  
Changed platform checking to use rbconfig instead of RUBY\_PLATFORM to  
avoid  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\ptools-1.1.7\CHANGES(3):\*  
Replaced RUBY\_PLATFORM with rbconfig check for the sake of other  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rack-1.0.1\lib\rack\rewindable\_input.rb(97):  
RUBY\_PLATFORM !~ /(mswin|mingw|cygwin|java)/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rails-2.3.5\CHANGELOG(497):\*  
Windows: include MinGW in RUBY\_PLATFORM check. #2982  
[removed\_email\_address@domain.invalid, Kaspar S.]  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rails-2.3.5\CHANGELOG(811):\*  
Windows: include MinGW in RUBY\_PLATFORM check. #2982  
[removed\_email\_address@domain.invalid, Kaspar S.]  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rails-2.3.5\lib\initializer.rb(873):  
if RUBY\_PLATFORM =~ /(:?mswin|mingw)/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rails-2.3.5\lib\commands\console.rb(1):irb  
= RUBY\_PLATFORM =~ /(:?mswin|mingw)/ ? ‘irb.bat’ : ‘irb’  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rails-2.3.5\lib\commands\dbconsole.rb(35):  
commands += commands.map{|cmd| “#{cmd}.exe”} if RUBY\_PLATFORM =~ /win32/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rails-2.3.5\lib\commands\runner.rb(21):  
if RUBY\_PLATFORM !~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rails-2.3.5\lib\rails\_generator\generators\applications\app\app\_generator.rb(261):  
].find { |f| File.exist?(f) } unless RUBY\_PLATFORM =~ /(:?mswin|mingw)/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rails-2.3.5\lib\tasks\testing.rake(33):  
STDERR.reopen(RUBY\_PLATFORM =~ /(:?mswin|mingw)/ ? ‘NUL:’ : ‘/dev/null’)  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\railties-3.0.pre\CHANGELOG(494):\*  
Windows: include MinGW in RUBY\_PLATFORM check. #2982  
[removed\_email\_address@domain.invalid, Kaspar S.]  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\railties-3.0.pre\CHANGELOG(808):\*  
Windows: include MinGW in RUBY\_PLATFORM check. #2982  
[removed\_email\_address@domain.invalid, Kaspar S.]  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\railties-3.0.pre\lib\rails\configuration.rb(44):  
RUBY\_PLATFORM =~ /(:?mswin|mingw)/ ?  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\railties-3.0.pre\lib\rails\commands\dbconsole.rb(45):  
commands += commands.map{|cmd| “#{cmd}.exe”} if RUBY\_PLATFORM =~ /win32/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\railties-3.0.pre\lib\rails\commands\runner.rb(21):  
if RUBY\_PLATFORM !~ /mswin/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\railties-3.0.pre\lib\rails\generators\actions.rb(243):  
sudo = options[:sudo] && RUBY\_PLATFORM !~ /mswin|mingw/ ? 'sudo ’ : ‘’  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\railties-3.0.pre\lib\rails\generators\actions.rb(300):  
if RUBY\_PLATFORM =~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\railties-3.0.pre\lib\rails\generators\rails\app\app\_generator.rb(207):  
].find { |f| File.exist?(f) } unless RUBY\_PLATFORM =~ /(:?mswin|mingw)/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\railties-3.0.pre\lib\rails\tasks\testing.rake(33):  
STDERR.reopen(RUBY\_PLATFORM =~ /(:?mswin|mingw)/ ? ‘NUL:’ : ‘/dev/null’)  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rake-0.8.4\lib\rake.rb(2143):  
RUBY\_PLATFORM =~  
/(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rake-0.8.7\lib\rake.rb(2167):  
RUBY\_PLATFORM =~  
/(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rspec-1.2.8\History.rdoc(342):\*  
Consider MinGW as valid RUBY\_PLATFORM for --colour option. (patch from  
Luis L.). Closes #406.  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rspec-1.2.8\History.rdoc(365):\*  
Consider MinGW as valid RUBY\_PLATFORM for --colour option. (patch from  
Luis L.). Closes #406.  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rspec-1.2.8\bin\autospec(4):system  
(RUBY\_PLATFORM =~ /mswin|mingw/ ? ‘autotest.bat’ : ‘autotest’), \*ARGV  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rspec-1.2.8\lib\spec\runner\options.rb(162):  
if @colour && RUBY\_PLATFORM =~ /mswin|mingw/ ;  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rspec-1.2.8\spec\spec\_helper.rb(16):  
::RUBY\_PLATFORM == ‘java’  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rspec-1.2.8\spec\spec\package\bin\_spec\_spec.rb(8):  
pending “Hangs on JRuby” if RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rspec-1.2.8\spec\spec\package\bin\_spec\_spec.rb(16):  
pending “Hangs on JRuby” if RUBY\_PLATFORM =~ /java/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rubygems-update-1.3.5\ChangeLog(3793):

- changed spec to use the RUBY\_PLATFORM for Platform::CURRENT  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\rubygems-update-1.3.5\lib\rubygems.rb(1036):  
@@win\_platform = !!WIN\_PATTERNS.find { |r| RUBY\_PLATFORM =~ r }  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\RubyInline-3.8.3\lib\inline.rb(580):  
RUBY\_PLATFORM =~ /darwin9.[01]/  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\RubyInline-3.8.3\lib\inline.rb(596):  
if WINDOZE and RUBY\_PLATFORM =~ /\_80$/ then  
ruby-1.8.6p368\lib\ruby\gems\1.8\gems\ZenTest-4.1.4\lib\unit\_diff.rb(40):  
WINDOZE = /win32/ =~ RUBY\_PLATFORM unless defined? WINDOZE  
ruby-1.8.6p368\lib\ruby\site\_ruby\1.8\rbreadline.rb(1223): return  
nil if RUBY\_PLATFORM =~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\site\_ruby\1.8\rbreadline.rb(2086): if  
RUBY\_PLATFORM =~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\site\_ruby\1.8\rbreadline.rb(2434): if  
RUBY\_PLATFORM =~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\site\_ruby\1.8\rbreadline.rb(4277): raise  
LoadError, “Cygwin is a Posix OS.” if RUBY\_PLATFORM =~ /\bcygwin\b/i  
ruby-1.8.6p368\lib\ruby\site\_ruby\1.8\rbreadline.rb(4278): raise  
LoadError, “Not Windows” if RUBY\_PLATFORM !~ /mswin|mingw/  
ruby-1.8.6p368\lib\ruby\site\_ruby\1.8\rubygems.rb(1036):  
@@win\_platform = !!WIN\_PATTERNS.find { |r| RUBY\_PLATFORM =~ r }

Tomas
