diff options
author | Leandro Camargo <leandroico@gmail.com> | 2017-01-18 01:42:38 -0200 |
---|---|---|
committer | Leandro Camargo <leandroico@gmail.com> | 2017-01-25 01:07:45 -0200 |
commit | 441a9beec3e6834d3fe5e047e65c4d8b32ff86d5 (patch) | |
tree | 5d87917c6633b0af1b5fd8f579a628203c96c6cc /lib | |
parent | 8fe708f4a2850d71c11234b234e039b2a9422299 (diff) | |
download | gitlab-ce-441a9beec3e6834d3fe5e047e65c4d8b32ff86d5.tar.gz |
Make some other refinements to validation logic
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/config/entry/validators.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/ci/config/entry/validators.rb b/lib/gitlab/ci/config/entry/validators.rb index 30c52dd65e8..bd7428b1272 100644 --- a/lib/gitlab/ci/config/entry/validators.rb +++ b/lib/gitlab/ci/config/entry/validators.rb @@ -66,7 +66,8 @@ module Gitlab private def look_like_regexp?(value) - value.start_with?('/') && value.end_with?('/') + value.is_a?(String) && value.start_with?('/') && + value.end_with?('/') end def validate_regexp(value) @@ -92,7 +93,6 @@ module Gitlab end def validate_string_or_regexp(value) - return true if value.is_a?(Symbol) return false unless value.is_a?(String) return validate_regexp(value) if look_like_regexp?(value) true |