summaryrefslogtreecommitdiff
path: root/lib/rdoc/context.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/context.rb')
-rw-r--r--lib/rdoc/context.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/rdoc/context.rb b/lib/rdoc/context.rb
index 6f9deae4a8..22339bf1c7 100644
--- a/lib/rdoc/context.rb
+++ b/lib/rdoc/context.rb
@@ -447,11 +447,13 @@ class RDoc::Context < RDoc::CodeObject
known = @methods_hash[key]
if known then
- known.comment = method.comment if known.comment.empty?
- previously = ", previously in #{known.file}" unless
- method.file == known.file
- @store.rdoc.options.warn \
- "Duplicate method #{known.full_name} in #{method.file}#{previously}"
+ if @store then # otherwise we are loading
+ known.comment = method.comment if known.comment.empty?
+ previously = ", previously in #{known.file}" unless
+ method.file == known.file
+ @store.rdoc.options.warn \
+ "Duplicate method #{known.full_name} in #{method.file}#{previously}"
+ end
else
@methods_hash[key] = method
method.visibility = @visibility