Fix Style/IdenticalConditionalBranches.

This commit is contained in:
Markus Reiter 2016-09-21 13:43:02 +02:00
parent ce6994b001
commit d7a312f6cf
2 changed files with 2 additions and 8 deletions

View File

@ -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.

View File

@ -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