[ruby/yaml] Compatibility for Psych 4

https://github.com/ruby/yaml/commit/b4b72ae0b4
This commit is contained in:
Hiroshi SHIBATA 2023-10-30 17:23:39 +09:00 committed by git
parent 5c1b7633fc
commit f757a5d3ce

View File

@ -65,7 +65,7 @@ class YAML::Store < PStore
end
def load(content)
table = YAML.unsafe_load(content)
table = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(content) : YAML.load(content)
if table == false
{}
else