Fix File::NULL for ruby built with MinGW #60

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

eregon commented Jul 19, 2012

Otherwise it produces a "File not found error" dumped to stderr when doing, for example:

`git rev-parse --git-dir 2>#{File::NULL}`

This patch, however, will not work on JRuby, because RUBY_PLATFORM is always "java".
I don't know why they chose that, but I guess the only right way is then RbConfig::CONFIG['host_os'] (excluding parsing RUBY_DESCRIPTION). What do you think?

Contributor

eregon commented Jul 19, 2012

Also, in MRI this is defined on File::Constants (so it's also available as IO::NULL).

Owner

marcandre commented Jul 20, 2012

Cool, thanks.
2.6.2 released.

@marcandre marcandre closed this Jul 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment