summaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-10 18:30:02 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-10 18:31:07 +0200
commit0ece6bd82839d0c9e3e27b65a6a201771f09190e (patch)
tree40c877c8377f2bcad111de9e3bdf0daabdb0c3a3 /app/helpers/application_helper.rb
parent6cf7dd625a7db143c146de1b146cba7dbcbc2576 (diff)
downloadgitlab-ce-0ece6bd82839d0c9e3e27b65a6a201771f09190e.tar.gz
Use `\A` and `\z` in regexes instead of `^` and `$`.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 3f3509bb18a..b5b0015542c 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -125,7 +125,7 @@ module ApplicationHelper
# If reference is commit id - we should add it to branch/tag selectbox
if(@ref && !options.flatten.include?(@ref) &&
- @ref =~ /^[0-9a-zA-Z]{6,52}$/)
+ @ref =~ /\A[0-9a-zA-Z]{6,52}\z/)
options << ['Commit', [@ref]]
end