ruby-changes:60906
From: Kazuhiro <ko1@a...>
Date: Sun, 26 Apr 2020 11:10:01 +0900 (JST)
Subject: [ruby-changes:60906] 63fe3739dd (master): Fix errors when `RDoc::RI::Paths::HOMEDIR` is nil
https://git.ruby-lang.org/ruby.git/commit/?id=63fe3739dd From 63fe3739dd13beeb049319606af6ffc6093a4c1e Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Sun, 26 Apr 2020 11:07:42 +0900 Subject: Fix errors when `RDoc::RI::Paths::HOMEDIR` is nil https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-ad7f67/ruby-master/log/20200425T175405Z.fail.html.gz ``` 4) Error: TestRDocServlet#test_asset: NoMethodError: undefined method `replace' for nil:NilClass /home/chkbuild/build/20200425T175405Z/ruby/test/rdoc/test_rdoc_servlet.rb:48:in `setup' 5) Error: TestRDocServlet#test_asset: NoMethodError: undefined method `replace' for nil:NilClass /home/chkbuild/build/20200425T175405Z/ruby/test/rdoc/test_rdoc_servlet.rb:63:in `teardown' ``` ... ``` 74) Error: TestRDocServlet#test_store_for_site: NoMethodError: undefined method `replace' for nil:NilClass /home/chkbuild/build/20200425T175405Z/ruby/test/rdoc/test_rdoc_servlet.rb:48:in `setup' 75) Error: TestRDocServlet#test_store_for_site: NoMethodError: undefined method `replace' for nil:NilClass /home/chkbuild/build/20200425T175405Z/ruby/test/rdoc/test_rdoc_servlet.rb:63:in `teardown' ``` diff --git a/test/rdoc/test_rdoc_servlet.rb b/test/rdoc/test_rdoc_servlet.rb index 1127408..9772513 100644 --- a/test/rdoc/test_rdoc_servlet.rb +++ b/test/rdoc/test_rdoc_servlet.rb @@ -45,7 +45,8 @@ class TestRDocServlet < RDoc::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_servlet.rb#L45 @orig_base = RDoc::RI::Paths::BASE RDoc::RI::Paths::BASE.replace @base @orig_ri_path_homedir = RDoc::RI::Paths::HOMEDIR - RDoc::RI::Paths::HOMEDIR.replace @home_dir + RDoc::RI::Paths.send :remove_const, :HOMEDIR + RDoc::RI::Paths.const_set :HOMEDIR, @home_dir RDoc::RI::Paths.instance_variable_set \ :@gemdirs, %w[/nonexistent/gems/example-1.0/ri] @@ -60,7 +61,8 @@ class TestRDocServlet < RDoc::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_servlet.rb#L61 FileUtils.rm_rf @tempdir RDoc::RI::Paths::BASE.replace @orig_base - RDoc::RI::Paths::HOMEDIR.replace @orig_ri_path_homedir + RDoc::RI::Paths.send :remove_const, :HOMEDIR + RDoc::RI::Paths.const_set :HOMEDIR, @orig_ri_path_homedir RDoc::RI::Paths.instance_variable_set :@gemdirs, nil end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/