From d7a312f6cf1a17e36891f4533ec48e53c5276e3d Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 21 Sep 2016 13:43:02 +0200 Subject: [PATCH] Fix Style/IdenticalConditionalBranches. --- Library/.rubocop_todo.yml | 5 ----- Library/Homebrew/formula_lock.rb | 5 ++--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Library/.rubocop_todo.yml b/Library/.rubocop_todo.yml index 7bbad3c872..04a2cdd6e9 100644 --- a/Library/.rubocop_todo.yml +++ b/Library/.rubocop_todo.yml @@ -188,11 +188,6 @@ Style/GuardClause: - 'Homebrew/utils/popen.rb' - 'Homebrew/version.rb' -# Offense count: 2 -Style/IdenticalConditionalBranches: - Exclude: - - 'Homebrew/formula_lock.rb' - # Offense count: 52 # Cop supports --auto-correct. # Configuration parameters: MaxLineLength. diff --git a/Library/Homebrew/formula_lock.rb b/Library/Homebrew/formula_lock.rb index 1ce62b328f..8743eaef8c 100644 --- a/Library/Homebrew/formula_lock.rb +++ b/Library/Homebrew/formula_lock.rb @@ -35,9 +35,8 @@ class FormulaLock if @lockfile.nil? || @lockfile.closed? @lockfile = @path.open(File::RDWR | File::CREAT) @lockfile.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) - @lockfile - else - @lockfile end + + @lockfile end end