diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-11-22 16:35:06 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-12-08 21:28:56 +0300 |
commit | d307dccbc60f088496fb727f40530ba3003b61fb (patch) | |
tree | 1741bd33500e5e037e0b0eeeff409b0ab6055bc8 /lib/gitlab/git.rb | |
parent | 24d682254a0ae68dfc605fc077c6a7610b97994a (diff) |
Use to_s.start_with? in tag/branch ref method
Diffstat (limited to 'lib/gitlab/git.rb')
-rw-r--r-- | lib/gitlab/git.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/git.rb b/lib/gitlab/git.rb index 44a62586a23..7c590846f74 100644 --- a/lib/gitlab/git.rb +++ b/lib/gitlab/git.rb @@ -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) |