Use to_s.start_with? in tag/branch ref method
This commit is contained in:
parent
24d682254a
commit
d307dccbc6
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue