Use to_s.start_with? in tag/branch ref method

This commit is contained in:
Matija Čupić 2018-11-22 14:35:06 +01:00
parent 24d682254a
commit d307dccbc6
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
1 changed files with 2 additions and 2 deletions

View File

@ -54,11 +54,11 @@ module Gitlab
end
def tag_ref?(ref)
ref =~ /^#{TAG_REF_PREFIX}.+/
ref.to_s.start_with?(TAG_REF_PREFIX)
end
def branch_ref?(ref)
ref =~ /^#{BRANCH_REF_PREFIX}.+/
ref.to_s.start_with?(BRANCH_REF_PREFIX)
end
def blank_ref?(ref)