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 @@ def finish @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 diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 2d8a9dea8c..3387e7ea4d 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -119,7 +119,7 @@ def error(msg) # +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