summaryrefslogtreecommitdiff
path: root/lib/extracts_path.rb
diff options
context:
space:
mode:
authorSemyon Pupkov <mail@semyonpupkov.com>2018-09-18 12:36:24 +0500
committerSemyon Pupkov <mail@semyonpupkov.com>2018-09-18 14:31:17 +0500
commitdef3ab29719846758cef8f1e1a5cb5f88320bc48 (patch)
treee2194241f1b1af38aa80392598d78ef01871c4b2 /lib/extracts_path.rb
parent953018e3d4b0bc101543218f4cdf235e1a9d51c8 (diff)
downloadgitlab-ce-def3ab29719846758cef8f1e1a5cb5f88320bc48.tar.gz
Fix rubocop Style/ZeroLengthPredicate
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r--lib/extracts_path.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index e8dbde176ef..e02d403f7b1 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -54,7 +54,7 @@ module ExtractsPath
valid_refs = ref_names.select { |v| id.start_with?("#{v}/") }
- if valid_refs.length == 0
+ if valid_refs.empty?
# No exact ref match, so just try our best
pair = id.match(%r{([^/]+)(.*)}).captures
else