summaryrefslogtreecommitdiff
path: root/lib/rdoc/options.rb
diff options
context:
space:
mode:
authorzzak <[email protected]>2023-03-04 22:24:01 +0900
committergit <[email protected]>2023-05-06 07:39:24 +0000
commit8b2884c0b51e4733c09ecbb388ca1b236bad738b (patch)
tree220d66663e79698fd81e02cee29c03ac4ded0e81 /lib/rdoc/options.rb
parent40438fc4d35738cad32d2bb7a0426ee2b1e32ade (diff)
[ruby/rdoc] Isolate root dir if specified
This ensures only files from the root directory are chosen, in order to allow a clean build from outside the source directory. https://github.com/ruby/rdoc/commit/f3b389aa9e
Diffstat (limited to 'lib/rdoc/options.rb')
-rw-r--r--lib/rdoc/options.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index eed0f6b39b..6ee29fd071 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -565,9 +565,10 @@ class RDoc::Options
@op_dir ||= 'doc'
- @rdoc_include << "." if @rdoc_include.empty?
root = @root.to_s
- @rdoc_include << root unless @rdoc_include.include?(root)
+ if @rdoc_include.empty? || !@rdoc_include.include?(root)
+ @rdoc_include << root
+ end
@exclude = self.exclude