Commit d5588f5c87ea2d774d952408ef3720c3828e5c34
1 parent
463073f8
Exists in
master
fix: add aliases to YAML load
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/settingslogic.rb
@@ -100,7 +100,7 @@ class Settingslogic < Hash | @@ -100,7 +100,7 @@ class Settingslogic < Hash | ||
100 | self.replace hash_or_file | 100 | self.replace hash_or_file |
101 | else | 101 | else |
102 | file_contents = open(hash_or_file).read | 102 | file_contents = open(hash_or_file).read |
103 | - hash = file_contents.empty? ? {} : YAML.load(ERB.new(file_contents).result).to_hash | 103 | + hash = file_contents.empty? ? {} : YAML.load(ERB.new(file_contents).result, aliases: true).to_hash |
104 | if self.class.namespace | 104 | if self.class.namespace |
105 | hash = hash[self.class.namespace] or return missing_key("Missing setting '#{self.class.namespace}' in #{hash_or_file}") | 105 | hash = hash[self.class.namespace] or return missing_key("Missing setting '#{self.class.namespace}' in #{hash_or_file}") |
106 | end | 106 | end |