summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-31 19:06:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-31 19:06:21 +0000
commit835c555f7f137746eb6f7cd32bd05a386852fdbe (patch)
tree67e96fe81b8fec7c1902afcd2590f0903b34a63d /lib/rdoc
parent3d562b6873384098fb8e7ec375f36f3bf246b6c9 (diff)
downloadruby-835c555f7f137746eb6f7cd32bd05a386852fdbe.tar.gz
options.rb: include root for out-place build
* lib/rdoc/options.rb (RDoc#finish): include root path in include paths, to work in another directory than the source directory. [ruby-core:56282] [Bug #8712] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/options.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index 7be43ca776..9a9d99d3df 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -466,6 +466,8 @@ class RDoc::Options
@op_dir ||= 'doc'
@rdoc_include << "." if @rdoc_include.empty?
+ root = @root.to_path
+ @rdoc_include << root unless @rdoc_include.include?(root)
if @exclude.nil? or Regexp === @exclude then
# done, #finish is being re-run