Skip to content

Commit 78914f3

Browse files
Fix compatibility with RDoc >= 6.10.0
ruby/rdoc@4a5206a added a kwarg to `RDoc::Markup::ToHtmlCrossref#cross_reference` which must be forwarded. This commit adds a double-splat (`**`) to the `cross_reference` monkey patch in order to forward that kwarg. It also adds a splat (`*`) in case more positional args with default values are added in the future.
1 parent cd75e36 commit 78914f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/sdoc/rdoc_monkey_patches.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def params
3232

3333

3434
RDoc::Markup::ToHtmlCrossref.prepend(Module.new do
35-
def cross_reference(name, text = nil, code = true)
35+
def cross_reference(name, text = nil, code = true, *, **)
3636
if text
3737
# Style ref links that look like code, such as `{Rails}[rdoc-ref:Rails]`.
3838
code ||= !text.include?(" ") || text.match?(/\S\(/)

0 commit comments

Comments
 (0)