aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/class_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/class_module.rb')
-rw-r--r--lib/rdoc/class_module.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rdoc/class_module.rb b/lib/rdoc/class_module.rb
index a520503598..1dbe57bdf1 100644
--- a/lib/rdoc/class_module.rb
+++ b/lib/rdoc/class_module.rb
@@ -31,7 +31,7 @@ class RDoc::ClassModule < RDoc::Context
##
# Comment and the location it came from. Use #add_comment to add comments
- attr_reader :comment_location
+ attr_accessor :comment_location
attr_accessor :diagram # :nodoc:
@@ -134,6 +134,9 @@ class RDoc::ClassModule < RDoc::Context
else
normalize_comment comment
end
+
+ @comment_location.delete_if { |(_, l)| l == location }
+
@comment_location << [comment, location]
self.comment = original