diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-12-13 15:05:12 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-12-13 15:39:41 +0900 |
| commit | e91b25ec8dc84e16496ab2a2490338aeb101731d (patch) | |
| tree | 828692eb54009b64b60885df758d8bf3429dc07d /test | |
| parent | 654404a9c2667034ac0a20069e071b6fbf2d37cd (diff) | |
Fixed compatibility error with setup command and rdoc plugin on rubygems
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12330
Diffstat (limited to 'test')
| -rw-r--r-- | test/rubygems/test_gem_rdoc.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_rdoc.rb b/test/rubygems/test_gem_rdoc.rb index 19ccf1e587..5c9e2d501b 100644 --- a/test/rubygems/test_gem_rdoc.rb +++ b/test/rubygems/test_gem_rdoc.rb @@ -5,8 +5,6 @@ require_relative "helper" require "rubygems/rdoc" class TestGemRDoc < Gem::TestCase - Gem::RDoc.load_rdoc - def setup super @@ -20,10 +18,16 @@ class TestGemRDoc < Gem::TestCase install_gem @a - @hook = Gem::RDoc.new @a + hook_class = if defined?(RDoc::RubyGemsHook) + RDoc::RubyGemsHook + else + Gem::RDoc + end + + @hook = hook_class.new @a begin - Gem::RDoc.load_rdoc + hook_class.load_rdoc rescue Gem::DocumentError => e pend e.message end |
