summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-15 14:37:11 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-15 14:37:11 -0800
commitc5ba87a2fbd4eb0bcce5431683e26e8d345db5c4 (patch)
tree3337cbcf38a72eaa275be7e995c7ed7c83002ca4 /lib/api
parent9c4015f3e8080f41daaac82cfe1465f6839ca427 (diff)
parentcd688a60111853f63413a87ad6632ad57368e886 (diff)
downloadgitlab-ce-c5ba87a2fbd4eb0bcce5431683e26e8d345db5c4.tar.gz
Merge pull request #8096 from cirosantilli/regex-to-string
Replace regex methods by string ones since faster and more readable
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/internal.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index 180e50611cf..a999cff09c0 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -25,8 +25,8 @@ module API
# project. This applies the correct project permissions to
# the wiki repository as well.
access =
- if project_path =~ /\.wiki\Z/
- project_path.sub!(/\.wiki\Z/, '')
+ if project_path.end_with?('.wiki')
+ project_path.chomp!('.wiki')
Gitlab::GitAccessWiki.new
else
Gitlab::GitAccess.new