diff options
author | Elan Ruusamäe <glen@delfi.ee> | 2016-11-16 02:08:50 +0200 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-12-01 11:40:11 +0000 |
commit | d87c4b9c0d3aed4a23d74f340ece2c4bff83101b (patch) | |
tree | 8f395ebd82aa62c55849cef5f6b0444f5840edd9 /lib | |
parent | 5b740fcf2978decca31a459184b16531d7517e35 (diff) | |
download | gitlab-shell-d87c4b9c0d3aed4a23d74f340ece2c4bff83101b.tar.gz |
use String.end_with? instead of regexp
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab_custom_hook.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab_custom_hook.rb b/lib/gitlab_custom_hook.rb index 451d5b4..6265ec1 100644 --- a/lib/gitlab_custom_hook.rb +++ b/lib/gitlab_custom_hook.rb @@ -92,7 +92,7 @@ class GitlabCustomHook # the resulting list is sorted def match_hook_files(path) Dir["#{path}/*"].select do |f| - !f[/~$/] && File.executable?(f) + !f.end_with?('~') && File.executable?(f) end.sort end end |