1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use IO::NULL always

This commit is contained in:
Nobuyoshi Nakada 2015-01-07 15:29:45 +09:00 committed by Yves Senn
parent e47d6a31a5
commit 69e365d2f4
4 changed files with 4 additions and 4 deletions

View file

@ -225,7 +225,7 @@ module ActiveRecord
def silence_stream(stream)
old_stream = stream.dup
stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
stream.reopen(IO::NULL)
stream.sync = true
yield
ensure

View file

@ -939,7 +939,7 @@ class CopyMigrationsTest < ActiveRecord::TestCase
def silence_stream(stream)
old_stream = stream.dup
stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
stream.reopen(IO::NULL)
stream.sync = true
yield
ensure

View file

@ -52,7 +52,7 @@ module GeneratorsTestHelper
def silence_stream(stream)
old_stream = stream.dup
stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
stream.reopen(IO::NULL)
stream.sync = true
yield
ensure

View file

@ -341,7 +341,7 @@ class ActiveSupport::TestCase
def silence_stream(stream)
old_stream = stream.dup
stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
stream.reopen(IO::NULL)
stream.sync = true
yield
ensure