Removes private sections from this comment. Private sections are flush to
the comment marker and start with -- and end with ++. For
C-style comments, a private marker may not start at the opening of the
comment.
/*
*--
* private
*++
* public
*/
# File lib/rdoc/comment.rb, line 210
def remove_private
# Workaround for gsub encoding for Ruby 1.9.2 and earlier
empty = ''
empty = RDoc::Encoding.change_encoding empty, @text.encoding
@text = @text.gsub(%^\s*([#*]?)--.*?^\s*(\11))\+\+\n?%, empty)
@text = @text.sub(%^\s*[#*]?--.*%, '')
end