Skip to content

Commit df9e83e

Browse files
Fix rdoc_top_level_for for RDoc 6.13.0
ruby/rdoc@f517b02 changed the signature of `RDoc::Store#initialize` from: ```ruby def initialize(path = nil, type = nil) ``` to: ```ruby def initialize(options, path: nil, type: nil) ``` which is a breaking change. This commit modifies `rdoc_top_level_for` to use the new signature. Because the issue only affects our testing code, this commit ignores compatibility with RDoc < 6.13.0.
1 parent e2d849f commit df9e83e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def rdoc_top_level_for(ruby_code)
2828
# foolproof way to initialize it is by simply running it with a dummy file.
2929
$rdoc_for_specs ||= rdoc_dry_run("--files", __FILE__)
3030

31-
$rdoc_for_specs.store = RDoc::Store.new
31+
$rdoc_for_specs.store = RDoc::Store.new(RDoc::Options.new)
3232

3333
Dir.mktmpdir do |dir|
3434
path = "#{dir}/ruby_code.rb"

0 commit comments

Comments
 (0)