summaryrefslogtreecommitdiff
path: root/lib/rdoc/class_module.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-13 07:58:47 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-13 07:58:47 +0000
commitd8c7695fbb2944aba9a69dce75f41b6881d1fc12 (patch)
treebe6a5904c879c9fa9a7c2556031064233e70880b /lib/rdoc/class_module.rb
parenta0046fe94972ba4873244a1b985cb69f1685b5f3 (diff)
* lib/rdoc/class_module.rb: Fixed duplicate comments for classes and
modules from C. * test/rdoc/test_rdoc_class_module.rb: Test for the above. * lib/rdoc/parser/c.rb: Reload C variable names to allow proper updates of an ri store for C files. * lib/rdoc/rdoc.rb: ditto. * lib/rdoc/store.rb: ditto. * test/rdoc/test_rdoc_parser_c.rb: Test for the above. * test/rdoc/test_rdoc_store.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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