summaryrefslogtreecommitdiff
path: root/lib/rdoc/comment.rb
diff options
context:
space:
mode:
authoraycabta <[email protected]>2019-01-22 04:46:46 +0900
committerHiroshi SHIBATA <[email protected]>2019-07-26 17:20:58 +0800
commita86d4eef4b4551a48a5329bb993c3c6c39a1b1f3 (patch)
tree15c6b61eac64464b984b41d59906b02643ab372f /lib/rdoc/comment.rb
parentf7cbbc707413f7e1c71ac1839b0c8834550451e6 (diff)
[ruby/rdoc] Normalization of comment should check language
RDoc::Text#normalize_comment that is included RDoc::Comment always remove Ruby style comment indicator "#" and C style comment indicator "/**/", but should check language and remove only the language's comment indicator. https://github.com/ruby/rdoc/commit/ca68ba1e73
Diffstat (limited to 'lib/rdoc/comment.rb')
-rw-r--r--lib/rdoc/comment.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rdoc/comment.rb b/lib/rdoc/comment.rb
index 0f643c45b9..35cacdd087 100644
--- a/lib/rdoc/comment.rb
+++ b/lib/rdoc/comment.rb
@@ -48,9 +48,10 @@ class RDoc::Comment
# Creates a new comment with +text+ that is found in the RDoc::TopLevel
# +location+.
- def initialize text = nil, location = nil
+ def initialize text = nil, location = nil, language = nil
@location = location
@text = text.nil? ? nil : text.dup
+ @language = language
@document = nil
@format = 'rdoc'