[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
This commit is contained in:
parent
40438fc4d3
commit
8b2884c0b5
@ -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…
x
Reference in New Issue
Block a user