diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index 386d7c19dd..363d4acf80 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -55,5 +55,5 @@ jobs: ruby tool/sync_default_gems.rb rdoc working-directory: ruby/ruby - name: Test RDoc - run: make -j2 -s test-all TESTS="rdoc --no-retry --exclude test_rdoc_rubygems_hook.rb" + run: make -j2 -s test-all TESTS="rdoc --no-retry" working-directory: ruby/ruby diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb index d45afc8d8a..9e4e408794 100644 --- a/test/rdoc/test_rdoc_rubygems_hook.rb +++ b/test/rdoc/test_rdoc_rubygems_hook.rb @@ -2,9 +2,13 @@ require 'rubygems' require 'fileutils' require 'tmpdir' -require_relative '../../lib/rubygems_plugin' require 'test/unit' +begin + require_relative '../../lib/rubygems_plugin' +rescue LoadError +end + class TestRDocRubyGemsHook < Test::Unit::TestCase def setup @a = Gem::Specification.new do |s| @@ -284,4 +288,4 @@ def test_setup_unwritable end end -end +end if defined?(RDoc::RubyGemsHook)