summaryrefslogtreecommitdiff
path: root/lib/rdoc/generators
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-24 04:07:46 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-24 04:07:46 +0000
commit47d12ab8d05218cd297c0835764f177ef55e3a40 (patch)
treea4f77a5fa9651cb5c65629776fdb867b54bc9315 /lib/rdoc/generators
parent65db4654f6e762fa2e2950e958b12c34ddb7f8ef (diff)
Deal with case where first file processed contains a :stopdoc:
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/generators')
-rw-r--r--lib/rdoc/generators/html_generator.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb
index a6a38f6a5c..8db578b934 100644
--- a/lib/rdoc/generators/html_generator.rb
+++ b/lib/rdoc/generators/html_generator.rb
@@ -1276,7 +1276,20 @@ module Generators
end
end
- ref = @files[0].path unless ref
+ unless ref
+ for file in @files
+ if file.document_self
+ ref = file.path
+ break
+ end
+ end
+ end
+
+ unless ref
+ $stderr.puts "Couldn't find anything to document"
+ $stderr.puts "Perhaps you've used :stopdoc: in all classes"
+ exit(1)
+ end
ref
end