提交 bc4cdae3 编写于 作者: W wycats

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

上级 c428fbdb
......@@ -37,7 +37,7 @@ def silence_stderr #:nodoc:
# 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册