summaryrefslogtreecommitdiff
path: root/lib/rdoc/generators/html_generator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/generators/html_generator.rb')
-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