Prefer $stderr over STDERR for consistency (#304)

Prior to this change there were only 3 instances of `STD(IN|OUT|ERR)`
versus 74 instances of `$std(in|out|err)` in the Homebrew code base. The
latter variant is also strongly suggested by bbatsov's Ruby Style Guide.
This commit is contained in:
Martin Afanasjew 2016-06-01 09:45:49 +02:00
parent 8e728d6604
commit 8486f6e04d
2 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ class Formulary
private
def load_file
STDERR.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug?
$stderr.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug?
raise FormulaUnavailableError.new(name) unless path.file?
Formulary.load_formula_from_path(name, path)
end
@ -199,7 +199,7 @@ class Formulary
end
def klass
STDERR.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug?
$stderr.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug?
namespace = "FormulaNamespace#{Digest::MD5.hexdigest(contents)}"
Formulary.load_formula(name, path, contents, namespace)
end

View File

@ -20,7 +20,7 @@ module Utils
return pipe.read
end
else
STDERR.reopen("/dev/null", "w")
$stderr.reopen("/dev/null", "w")
exec(*args)
end
end