Skip to content

Commit 911b465

Browse files
committed
Fix issue in TestRDocServlet, also happens on CRuby
* `Gem::Specification.all = [@SPEC]` is a bad hack and is what breaks it, but that's what the test does, even for latest CRuby.
1 parent ba52a0e commit 911b465

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/mri/tests/rdoc/test_rdoc_servlet.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# frozen_string_literal: true
22
require_relative 'helper'
33

4+
# Load those eagerly, otherwise require 'json' inside fails due to `Gem::Specification.all = [@spec]`, also on CRuby
5+
_load_eagerly = [
6+
RDoc::Servlet,
7+
RDoc::Generator::JsonIndex
8+
]
9+
410
class TestRDocServlet < RDoc::TestCase
511

612
def setup

0 commit comments

Comments
 (0)