Don't write to /dev/null on mingw. [#3921 state:resolved] (ht: Patrick Daryll Glandien)

This commit is contained in:
wycats
2010-03-27 04:15:41 -07:00
parent c428fbdb1d
commit bc4cdae3d9

View File

@@ -37,7 +37,7 @@ module Kernel
# puts 'But this will'
def silence_stream(stream)
old_stream = stream.dup
stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
stream.reopen(RUBY_PLATFORM =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
stream.sync = true
yield
ensure