diff --git a/lib/refrepo/input_loader.rb b/lib/refrepo/input_loader.rb index a5b5bd3a6425e0ef42b42be62731d9d3835aed2d..1975726f33b6607722087090617d77ebf7c96378 100644 --- a/lib/refrepo/input_loader.rb +++ b/lib/refrepo/input_loader.rb @@ -21,9 +21,15 @@ def load_yaml_file_hierarchy(directory = File.expand_path("../../input/grid5000/ # Load YAML if /\.y.*ml\.erb$/.match(filename) # For files with .erb.yaml extensions, process the template before loading the YAML. - file_hash = YAML::load(ERB.new(File.read(filename)).result(binding)) + file_hash = YAML::load( + ERB.new(File.read(filename)).result(binding), + permitted_classes: [Date, Time] + ) else - file_hash = YAML::load_file(filename) + file_hash = YAML::load_file( + filename, + permitted_classes: [Date, Time] + ) end if not file_hash raise StandardError.new("loaded hash is empty")