From ff8570b005e552685d518898b866070ff116eab6 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Thu, 12 Dec 2024 12:55:22 +0000 Subject: [PATCH] Fix LoadError's linking issue Original issue: https://github.com/ruby/rdoc/issues/1128 The problem is caused by the `# :stopdoc:` directive in `bundled_gems.rb`, which's scope covers the redefinition of `LoadError`. Since the goal of `# :stopdoc:` is to hide the documentation of `Gem::BUNDLED_GEMS`, we can use `# :nodoc:` on it instead. --- error.c | 2 +- lib/bundled_gems.rb | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/error.c b/error.c index 59c6fa7dd6..f661806f3e 100644 --- a/error.c +++ b/error.c @@ -3401,7 +3401,7 @@ syserr_eqq(VALUE self, VALUE exc) * * * NoMemoryError * * ScriptError - * * {LoadError}[https://docs.ruby-lang.org/en/master/LoadError.html] + * * LoadError * * NotImplementedError * * SyntaxError * * SecurityError diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index 96489257d7..11a47784e6 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -1,8 +1,6 @@ # -*- frozen-string-literal: true -*- -# :stopdoc: - -module Gem::BUNDLED_GEMS +module Gem::BUNDLED_GEMS # :nodoc: SINCE = { "matrix" => "3.1.0", "net-ftp" => "3.1.0", @@ -247,7 +245,7 @@ end # for RubyGems without Bundler environment. # If loading library is not part of the default gems and the bundled gems, warn it. class LoadError - def message + def message # :nodoc: return super unless path name = path.tr("/", "-") @@ -257,5 +255,3 @@ class LoadError super end end - -# :startdoc: