diff --git a/rdoc-pr1531-fix-mutilple-document-installation.patch b/rdoc-pr1531-fix-mutilple-document-installation.patch new file mode 100644 index 0000000..192863f --- /dev/null +++ b/rdoc-pr1531-fix-mutilple-document-installation.patch @@ -0,0 +1,28 @@ +From 994ee4c17fb8c217ab0335df55620c6bdb5d5cbe Mon Sep 17 00:00:00 2001 +From: tompng +Date: Fri, 26 Dec 2025 04:57:12 +0900 +Subject: [PATCH] Fix comment_location for merged ClassModule + +--- + lib/rdoc/code_object/class_module.rb | 7 ++++++- + test/rdoc/code_object/class_module_test.rb | 6 ++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/lib/rdoc/code_object/class_module.rb b/lib/rdoc/code_object/class_module.rb +index b6bed352a2..d7ee36f950 100644 +--- a/lib/rdoc/code_object/class_module.rb ++++ b/lib/rdoc/code_object/class_module.rb +@@ -477,7 +477,12 @@ def merge(class_module) + document = document.merge other_document + + @comment = RDoc::Comment.from_document(document) +- @comment_location = document ++ ++ @comment_location = if document.parts.first.is_a?(RDoc::Markup::Document) ++ document.parts.map { |doc| [doc, doc.file] } ++ else ++ [[document, document.file]] ++ end + end + + cm = class_module diff --git a/ruby.spec b/ruby.spec index bd11514..578b5cc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -295,6 +295,9 @@ Patch7: ruby-3.3.0-Disable-syntax-suggest-test-case.patch # Add a way to provide %%build_rustflags to JIT's rustc. # https://github.com/ruby/ruby/pull/15695 Patch8: ruby-4.0.1-Support-customizable-rustc_flags-for-rustc-builds.patch +# https://github.com/ruby/rdoc/pull/1531 +# Fix error with `gem install --document=rdoc,ri` +Patch9: rdoc-pr1531-fix-mutilple-document-installation.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} %{?with_rubypick:Suggests: rubypick} @@ -797,6 +800,7 @@ analysis result in RBS format, a standard type description format for Ruby pushd .bundle/gems/rdoc-%{rdoc_version} %patch 1 -p1 +%patch 9 -p1 popd %patch 2 -p1