summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/yaml/store.rb4
1 files changed, 2 insertions, 2 deletions
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