summaryrefslogtreecommitdiff
path: root/config/settings.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 03:06:12 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 03:06:12 +0000
commitf155cc9034f2247c5d368f9b0212ad44248b0c5e (patch)
tree902480293b665d74a337aeae6a0521104f561988 /config/settings.rb
parentc920712fab6abdc37de9444e6bbcd170c295b21a (diff)
downloadgitlab-ce-f155cc9034f2247c5d368f9b0212ad44248b0c5e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/settings.rb')
-rw-r--r--config/settings.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/settings.rb b/config/settings.rb
index 8756c120645..767c6c56337 100644
--- a/config/settings.rb
+++ b/config/settings.rb
@@ -104,10 +104,10 @@ class Settings < Settingslogic
# check that `current` (string or integer) is a contant in `modul`.
def verify_constant(modul, current, default)
- constant = modul.constants.find { |name| modul.const_get(name) == current }
- value = constant.nil? ? default : modul.const_get(constant)
+ constant = modul.constants.find { |name| modul.const_get(name, false) == current }
+ value = constant.nil? ? default : modul.const_get(constant, false)
if current.is_a? String
- value = modul.const_get(current.upcase) rescue default
+ value = modul.const_get(current.upcase, false) rescue default
end
value