Commit d307dccb authored by Matija Čupić's avatar Matija Čupić

Use to_s.start_with? in tag/branch ref method

parent 24d68225
...@@ -54,11 +54,11 @@ module Gitlab ...@@ -54,11 +54,11 @@ module Gitlab
end end
def tag_ref?(ref) def tag_ref?(ref)
ref =~ /^#{TAG_REF_PREFIX}.+/ ref.to_s.start_with?(TAG_REF_PREFIX)
end end
def branch_ref?(ref) def branch_ref?(ref)
ref =~ /^#{BRANCH_REF_PREFIX}.+/ ref.to_s.start_with?(BRANCH_REF_PREFIX)
end end
def blank_ref?(ref) def blank_ref?(ref)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment