summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2025-01-15 15:30:14 +0900
committerHiroshi SHIBATA <[email protected]>2025-01-15 16:52:56 +0900
commit667e938f1ddfc063f693bf3a06935016f1faf12f (patch)
treeb5b53d23edc60700df03b09b864f5ead11d21b2f
parent2bfa49f28866f3d4dfecd04984ad180aff82bb7d (diff)
rdoc-srcdir can refer srcdir by itself
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12577
-rw-r--r--common.mk2
-rwxr-xr-xtool/rdoc-srcdir2
2 files changed, 2 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index 247a7ffb52..7c767a7b6a 100644
--- a/common.mk
+++ b/common.mk
@@ -64,7 +64,7 @@ LIBRUBY_EXTS = ./.libruby-with-ext.time
REVISION_H = ./.revision.time
PLATFORM_D = $(TIMESTAMPDIR)/.$(PLATFORM_DIR).time
ENC_TRANS_D = $(TIMESTAMPDIR)/.enc-trans.time
-RDOC = $(XRUBY) "$(tooldir)/rdoc-srcdir" $(srcdir)
+RDOC = $(XRUBY) "$(tooldir)/rdoc-srcdir"
RDOCOUT = $(EXTOUT)/rdoc
HTMLOUT = $(EXTOUT)/html
CAPIOUT = doc/capi
diff --git a/tool/rdoc-srcdir b/tool/rdoc-srcdir
index a6a3c9ee24..f830fdc302 100755
--- a/tool/rdoc-srcdir
+++ b/tool/rdoc-srcdir
@@ -1,6 +1,6 @@
#!ruby -W0
-rdoc_path = Dir.glob("#{ARGV[0]}/.bundle/gems/rdoc-*").first
+rdoc_path = Dir.glob("#{File.dirname(__dir__)}/.bundle/gems/rdoc-*").first
$LOAD_PATH.unshift("#{rdoc_path}/lib")
require 'rdoc/rdoc'