diff --git a/lib/yaml/store.rb b/lib/yaml/store.rb index f24e4ad332..859621d271 100644 --- a/lib/yaml/store.rb +++ b/lib/yaml/store.rb @@ -69,8 +69,8 @@ class YAML::Store < PStore end def load(content) - table = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(content) : YAML.load(content) - if table == false + table = YAML.respond_to?(:safe_load) ? YAML.safe_load(content, permitted_classes: [Symbol]) : YAML.load(content) + if table == false || table == nil {} else table