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:
parent
8e728d6604
commit
8486f6e04d
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user