From 8486f6e04d46323e3e17a71c4c8b3ce948d35bae Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Wed, 1 Jun 2016 09:45:49 +0200 Subject: 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.--- Library/Homebrew/formulary.rb | 4 ++-- Library/Homebrew/utils/popen.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 8a436531c..38f71c85a 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -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 diff --git a/Library/Homebrew/utils/popen.rb b/Library/Homebrew/utils/popen.rb index 64dee8ddf..76e67b3a9 100644 --- a/Library/Homebrew/utils/popen.rb +++ b/Library/Homebrew/utils/popen.rb @@ -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 -- cgit v1.2.3