Using MinGW Ruby
It looks like I’m getting quite involved with building ruby on MinGW now.
One of the things that is starting to come up is some common code that breaks when moving between the two builds, and one particular example came up tonight:
[source:ruby]
RUBY_PLATFORM =~ /mswin/
[/source]
What I’m going to have to look into (or hopefully told) is how RubyGems is now splitting platforms (I seem to remember Eric Hodel has posted about this elsewhere and recently worked on it). I’m hoping that can / is exposed to make life easier for a lot of developers. I know zenspider often sets WINDOZE, I don’t remember the test he most often uses for it though.
Outside / without rubygems though, it needs to generally be:
[source:ruby]
RUBY_PLATFORM =~ /mswin|mingw/
[/source]
Particularly when using things like signals or device paths.