Workaround for bug JRUBY-4352?

I have run into this JRuby bug

http://jira.codehaus.org/browse/JRUBY-4352

where JRuby fails to detect Windows Server 2008 R2 as a Windows type
operating system. I was wondering if it would be a suitable, temporary
workaround to put this code at the very top af my application:

require ‘rbconfig’
if /Windows/i =~ Config::CONFIG[‘host_os’]
Config::CONFIG[‘host_os’] = ‘mswin32’
end

It seems to handle the problem I have noticed. I was wondering if there
might be some Java code in JRuby which also must be able to detect the
operating system and not using Config::CONFIG[‘host_os’].

Any comments or other ideas?

Claus

On Dec 23, 2010, at 2:43 AM, Claus Folke B. wrote:

Config::CONFIG[‘host_os’] = ‘mswin32’
end

It seems to handle the problem I have noticed.

Any comments or other ideas?

That is essentially what happens internally.