mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 21:49:06 +02:00
[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.
f3b389aa9e
This commit is contained in:
parent
40438fc4d3
commit
8b2884c0b5
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ class RDoc::RDoc
|
|||
# +files+.
|
||||
|
||||
def gather_files files
|
||||
files = ["."] if files.empty?
|
||||
files = [@options.root.to_s] if files.empty?
|
||||
|
||||
file_list = normalized_file_list files, true, @options.exclude
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue