ruby-changes:66227
From: Hiroshi <ko1@a...>
Date: Mon, 17 May 2021 12:05:39 +0900 (JST)
Subject: [ruby-changes:66227] d8fd92f620 (master): Workaround with fbb4e3f96c10de2240f2d87eac19cf6f62f65fea in rdoc
https://git.ruby-lang.org/ruby.git/commit/?id=d8fd92f620 From d8fd92f62024d85271a3f1125bc6928409f912e1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Mon, 17 May 2021 12:04:40 +0900 Subject: 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 df04646..ded4db9 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -162,7 +162,7 @@ class RDoc::RDoc https://github.com/ruby/ruby/blob/trunk/lib/rdoc/rdoc.rb#L162 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 140c4af..a79d5df 100644 --- a/test/rdoc/test_rdoc_options.rb +++ b/test/rdoc/test_rdoc_options.rb @@ -145,7 +145,7 @@ class TestRDocOptions < RDoc::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_options.rb#L145 @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: https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_options.rb#L161 - /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: https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_options.rb#L749 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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/