diff options
author | Go MAEDA <maeda@farend.jp> | 2023-02-06 14:08:30 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-02-06 14:08:30 +0000 |
commit | e03bc47e1413a771505dcbf3fbb907d3a689e24a (patch) | |
tree | 026c5101a0364ca9d4e88615a9581c31facc7e8d /app | |
parent | 12a5731aabecf69c3e8a2427fbf1e260feb868ca (diff) | |
download | redmine-e03bc47e1413a771505dcbf3fbb907d3a689e24a.tar.gz redmine-e03bc47e1413a771505dcbf3fbb907d3a689e24a.zip |
Fix config/settings.yml not closed in Setting.load_available_settings (#38250).
Patch by Thomas Löber.
git-svn-id: https://svn.redmine.org/redmine/trunk@22099 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/setting.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/setting.rb b/app/models/setting.rb index 3e3476330..1b73d7c1f 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -320,8 +320,10 @@ class Setting < ActiveRecord::Base end def self.load_available_settings - YAML::load(File.open("#{Rails.root}/config/settings.yml")).each do |name, options| - define_setting name, options + File.open("#{Rails.root}/config/settings.yml") do |f| + YAML.load(f).each do |name, options| + define_setting name, options + end end end |