From b121e5fd7be1b1984e51caa6a369dd8faf70a57a Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Thu, 6 Aug 2015 15:45:52 +0800 Subject: more core file style updated by rubocop --- Library/ENV/4.3/cc | 4 ++-- Library/ENV/scm/git | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Library/ENV') diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index f388e00bf..1fb6d8207 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -21,7 +21,7 @@ class Cmd end def mode - if @arg0 == "cpp" or @arg0 == "ld" + if @arg0 == "cpp" || @arg0 == "ld" @arg0.to_sym elsif @args.include? "-c" if @arg0 =~ /(?:c|g|clang)\+\+/ @@ -61,7 +61,7 @@ class Cmd end def args - if @args.length == 1 and @args[0] == "-v" + if @args.length == 1 && @args[0] == "-v" # Don't add linker arguments if -v passed as sole option. This stops gcc # -v with no other arguments from outputting a linker error. Some # software uses gcc -v (wrongly) to sniff the GCC version. diff --git a/Library/ENV/scm/git b/Library/ENV/scm/git index 06a04b7f1..0c768403c 100755 --- a/Library/ENV/scm/git +++ b/Library/ENV/scm/git @@ -17,7 +17,7 @@ when "git" then %W[HOMEBREW_GIT GIT] when "svn" then %W[HOMEBREW_SVN] else [] end.each do |key| - exec ENV[key], *ARGV if ENV[key] and File.executable? ENV[key] + exec ENV[key], *ARGV if ENV[key] && File.executable?(ENV[key]) end brew_version = File.expand_path("#{D}/../../../bin/#{F}") -- cgit v1.2.3