summaryrefslogtreecommitdiff
path: root/tool/rdoc-srcdir
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2025-01-15 12:09:31 +0900
committerHiroshi SHIBATA <[email protected]>2025-01-15 16:52:56 +0900
commit86575e243eda81a77ce2ede6a39e534eed9a5c3d (patch)
treea369705b0b0ba2cd2f85047f838b58b59f69c8ef /tool/rdoc-srcdir
parent86d871d29cda15810d9d60dc1b94a07e9530e0cb (diff)
Use rdoc provided by bundled gems for generating ruby documentation
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12577
Diffstat (limited to 'tool/rdoc-srcdir')
-rwxr-xr-xtool/rdoc-srcdir3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/rdoc-srcdir b/tool/rdoc-srcdir
index 03e5171650..a6a3c9ee24 100755
--- a/tool/rdoc-srcdir
+++ b/tool/rdoc-srcdir
@@ -1,6 +1,7 @@
#!ruby -W0
-$:.unshift(File.expand_path("../lib", __dir__))
+rdoc_path = Dir.glob("#{ARGV[0]}/.bundle/gems/rdoc-*").first
+$LOAD_PATH.unshift("#{rdoc_path}/lib")
require 'rdoc/rdoc'
# Make only the output directory relative to the invoked directory.