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
|
private
|
||||||
|
|
||||||
def load_file
|
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?
|
raise FormulaUnavailableError.new(name) unless path.file?
|
||||||
Formulary.load_formula_from_path(name, path)
|
Formulary.load_formula_from_path(name, path)
|
||||||
end
|
end
|
||||||
@ -199,7 +199,7 @@ class Formulary
|
|||||||
end
|
end
|
||||||
|
|
||||||
def klass
|
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)}"
|
namespace = "FormulaNamespace#{Digest::MD5.hexdigest(contents)}"
|
||||||
Formulary.load_formula(name, path, contents, namespace)
|
Formulary.load_formula(name, path, contents, namespace)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -20,7 +20,7 @@ module Utils
|
|||||||
return pipe.read
|
return pipe.read
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
STDERR.reopen("/dev/null", "w")
|
$stderr.reopen("/dev/null", "w")
|
||||||
exec(*args)
|
exec(*args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user