diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-19 16:09:38 +0200 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-12-28 23:53:27 +0100 |
commit | cd688a60111853f63413a87ad6632ad57368e886 (patch) | |
tree | 7213f737fa99bc91141e53a637ba95530dfcfdaf /lib/api/internal.rb | |
parent | c8bb171664de94778d4e6eba7773596b265f9efb (diff) | |
download | gitlab-ce-cd688a60111853f63413a87ad6632ad57368e886.tar.gz |
Replace regex methods by string ones since faster
and more readable.
Diffstat (limited to 'lib/api/internal.rb')
-rw-r--r-- | lib/api/internal.rb | 4 |
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 |