From def3ab29719846758cef8f1e1a5cb5f88320bc48 Mon Sep 17 00:00:00 2001 From: Semyon Pupkov Date: Tue, 18 Sep 2018 12:36:24 +0500 Subject: Fix rubocop Style/ZeroLengthPredicate --- lib/extracts_path.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/extracts_path.rb') 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 -- cgit v1.2.1