summaryrefslogtreecommitdiff
path: root/lib/yaml
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-10-30 17:23:39 +0900
committergit <svn-admin@ruby-lang.org>2023-10-30 08:35:13 +0000
commitf757a5d3ceb62a1f049f7060429b5b3bac6ad545 (patch)
treebb9cc6dbb1800914a80aec08db84176d6c2c78e9 /lib/yaml
parent5c1b7633fcd9c7c43974b72bd36cab1f9e9bd186 (diff)
[ruby/yaml] Compatibility for Psych 4
https://github.com/ruby/yaml/commit/b4b72ae0b4
Diffstat (limited to 'lib/yaml')
-rw-r--r--lib/yaml/store.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yaml/store.rb b/lib/yaml/store.rb
index f8650b942f..88dd1b978c 100644
--- a/lib/yaml/store.rb
+++ b/lib/yaml/store.rb
@@ -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