diff --git a/test/rdoc/test_rdoc_servlet.rb b/test/rdoc/test_rdoc_servlet.rb index 1127408193..977251308a 100644 --- a/test/rdoc/test_rdoc_servlet.rb +++ b/test/rdoc/test_rdoc_servlet.rb @@ -45,7 +45,8 @@ class TestRDocServlet < RDoc::TestCase @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 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