mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use File::NULL instead of "/dev/null"
This commit is contained in:
parent
090eaa7e1b
commit
7f89d4e8bf
5 changed files with 5 additions and 5 deletions
|
@ -21,7 +21,7 @@ module ActionDispatch
|
|||
assert json["accepting"]
|
||||
end
|
||||
|
||||
if system("dot -V 2>/dev/null")
|
||||
if system("dot -V", 2 => File::NULL)
|
||||
def test_to_svg
|
||||
table = tt %w{
|
||||
/articles(.:format)
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace :test do
|
|||
start_time = Time.now
|
||||
|
||||
loop do
|
||||
break if system("lsof -i :4567 >/dev/null")
|
||||
break if system("lsof -i :4567", 1 => File::NULL)
|
||||
|
||||
if Time.now - start_time > 5
|
||||
puts "Timed out after 5 seconds"
|
||||
|
|
|
@ -38,7 +38,7 @@ module SidekiqJobsManager
|
|||
# Sidekiq is not warning-clean :(
|
||||
$VERBOSE = false
|
||||
|
||||
$stdin.reopen("/dev/null")
|
||||
$stdin.reopen(File::NULL)
|
||||
$stdout.sync = true
|
||||
$stderr.sync = true
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class MemCacheStoreTest < ActiveSupport::TestCase
|
|||
@data = @cache.instance_variable_get(:@data)
|
||||
@cache.clear
|
||||
@cache.silence!
|
||||
@cache.logger = ActiveSupport::Logger.new("/dev/null")
|
||||
@cache.logger = ActiveSupport::Logger.new(File::NULL)
|
||||
end
|
||||
|
||||
include CacheStoreBehavior
|
||||
|
|
|
@ -14,7 +14,7 @@ commands = [
|
|||
]
|
||||
|
||||
commands.each do |command|
|
||||
system("#{command} > /dev/null 2>&1")
|
||||
system(command, [1, 2] => File::NULL)
|
||||
end
|
||||
|
||||
class Build
|
||||
|
|
Loading…
Reference in a new issue