lib/anyway/loaders/yaml.rb in anyway_config-2.3.0 vs lib/anyway/loaders/yaml.rb in anyway_config-2.3.1
- old
+ new
@@ -51,16 +51,16 @@
# By default, YAML load will return `false` when the yaml document is
# empty. When this occurs, we return an empty hash instead, to match
# the interface when no config file is present.
begin
if defined?(ERB)
- ::YAML.load(ERB.new(File.read(path)).result, aliases: true) || {} # rubocop:disable Security/YAMLLoad
+ ::YAML.load(ERB.new(File.read(path)).result, aliases: true) || {}
else
::YAML.load_file(path, aliases: true) || {}
end
rescue ArgumentError
if defined?(ERB)
- ::YAML.load(ERB.new(File.read(path)).result) || {} # rubocop:disable Security/YAMLLoad
+ ::YAML.load(ERB.new(File.read(path)).result) || {}
else
::YAML.load_file(path) || {}
end
end
end