From d8fd92f62024d85271a3f1125bc6928409f912e1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 17 May 2021 12:04:40 +0900 Subject: [PATCH] Workaround with fbb4e3f96c10de2240f2d87eac19cf6f62f65fea in rdoc --- lib/rdoc/rdoc.rb | 2 +- test/rdoc/test_rdoc_options.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index df04646f3c..ded4db9087 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -162,7 +162,7 @@ class RDoc::RDoc RDoc.load_yaml begin - options = YAML.load_file '.rdoc_options' + options = YAML.unsafe_load_file '.rdoc_options' rescue Psych::SyntaxError end diff --git a/test/rdoc/test_rdoc_options.rb b/test/rdoc/test_rdoc_options.rb index 140c4afc9b..a79d5dfa31 100644 --- a/test/rdoc/test_rdoc_options.rb +++ b/test/rdoc/test_rdoc_options.rb @@ -145,7 +145,7 @@ class TestRDocOptions < RDoc::TestCase @options.encoding = Encoding::IBM437 - options = YAML.load YAML.dump @options + options = YAML.unsafe_load YAML.dump @options assert_equal Encoding::IBM437, options.encoding end @@ -161,7 +161,7 @@ rdoc_include: - /etc YAML - options = YAML.load yaml + options = YAML.unsafe_load yaml assert_empty options.rdoc_include assert_empty options.static_path @@ -749,7 +749,7 @@ rdoc_include: assert File.exist? '.rdoc_options' - assert_equal @options, YAML.load(File.read('.rdoc_options')) + assert_equal @options, YAML.unsafe_load(File.read('.rdoc_options')) end end