Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use File::NULL instead of "/dev/null" #29958

Merged
merged 1 commit into from
Aug 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion actionpack/test/journey/gtg/transition_table_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_to_json
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)
Expand Down
2 changes: 1 addition & 1 deletion actionview/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion activejob/test/support/integration/adapters/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def start_workers
# Sidekiq is not warning-clean :(
$VERBOSE = false

$stdin.reopen("/dev/null")
$stdin.reopen(File::NULL)
$stdout.sync = true
$stderr.sync = true

Expand Down
2 changes: 1 addition & 1 deletion activesupport/test/cache/stores/mem_cache_store_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def setup
@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
Expand Down
2 changes: 1 addition & 1 deletion ci/travis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
]

commands.each do |command|
system("#{command} > /dev/null 2>&1")
system(command, [1, 2] => File::NULL)
end

class Build
Expand Down