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:
parent
e47d6a31a5
commit
69e365d2f4
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue