Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@21294
e93f8b46-1217-0410-a6f0-
8f06a7374b81
v = read_attribute(:value)
# Unserialize serialized settings
if available_settings[name]['serialized'] && v.is_a?(String)
- v = YAML::load(v)
+ # YAML.load works as YAML.safe_load if Psych >= 4.0 is installed
+ v = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(v) : YAML.load(v)
v = force_utf8_strings(v)
end
v = v.to_sym if available_settings[name]['format'] == 'symbol' && !v.blank?