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.
This commit is contained in:
Stan Lo 2024-12-12 12:55:22 +00:00 committed by Peter Zhu
parent 0bdb38ba6b
commit ff8570b005
Notes: git 2024-12-12 21:43:43 +00:00
2 changed files with 3 additions and 7 deletions

View File

@ -3401,7 +3401,7 @@ syserr_eqq(VALUE self, VALUE exc)
* *
* * NoMemoryError * * NoMemoryError
* * ScriptError * * ScriptError
* * {LoadError}[https://docs.ruby-lang.org/en/master/LoadError.html] * * LoadError
* * NotImplementedError * * NotImplementedError
* * SyntaxError * * SyntaxError
* * SecurityError * * SecurityError

View File

@ -1,8 +1,6 @@
# -*- frozen-string-literal: true -*- # -*- frozen-string-literal: true -*-
# :stopdoc: module Gem::BUNDLED_GEMS # :nodoc:
module Gem::BUNDLED_GEMS
SINCE = { SINCE = {
"matrix" => "3.1.0", "matrix" => "3.1.0",
"net-ftp" => "3.1.0", "net-ftp" => "3.1.0",
@ -247,7 +245,7 @@ end
# for RubyGems without Bundler environment. # for RubyGems without Bundler environment.
# If loading library is not part of the default gems and the bundled gems, warn it. # If loading library is not part of the default gems and the bundled gems, warn it.
class LoadError class LoadError
def message def message # :nodoc:
return super unless path return super unless path
name = path.tr("/", "-") name = path.tr("/", "-")
@ -257,5 +255,3 @@ class LoadError
super super
end end
end end
# :startdoc: