Skip to content

Commit 598166f

Browse files
authored
Merge pull request #9828 from ruby/claude/rdoc-test-loaderror-b06d6e
Load RDoc before the test sandbox in TestGemRDoc
2 parents e5f0607 + e794ab7 commit 598166f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/rubygems/test_gem_rdoc.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
require_relative "helper"
55
require "rubygems/rdoc"
66

7+
# RDoc resolves its own dependencies lazily, on require. Load them here, while
8+
# the real gem paths are still in effect, because Gem::TestCase#setup points
9+
# GEM_HOME at an empty temporary directory where they cannot be found.
10+
Gem::RDoc.load_rdoc if defined?(Gem::RDoc)
11+
712
class TestGemRDoc < Gem::TestCase
813
def setup
914
super

0 commit comments

Comments
 (0)