File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 1818 test can be created. RubyForge bug #28821 by Usaku Nakamura.
1919 * Fixed line-height of headings in method and alias descriptions. RubyForge
2020 Bug #2770 by Adam Avilla
21+ * Relaxed RDoc::Parser::Ruby#remove_private_comments to consume more dashes
22+ as older versions once did. Bug #7 by Claus Folke Brobak.
2123
2224=== 3.4 / 2010-01-06
2325
Original file line number Diff line number Diff line change @@ -1647,8 +1647,8 @@ def remove_private_comments(comment)
16471647 empty = ''
16481648 empty . force_encoding comment . encoding if Object . const_defined? :Encoding
16491649
1650- comment . gsub! ( /^#--\n .*?^#\+ \+ \n ?/m , empty )
1651- comment . sub! ( /^#--\n .* \n ? /m , empty )
1650+ comment . gsub! ( /^#--.*?^#\+ \+ \n ?/m , empty )
1651+ comment . sub! ( /^#--.* /m , '' )
16521652 end
16531653
16541654 ##
Original file line number Diff line number Diff line change @@ -203,6 +203,25 @@ def test_remove_private_comments_encoding
203203 assert_equal Encoding ::IBM437 , comment . encoding
204204 end
205205
206+ def test_remove_private_comments_long
207+ util_parser ''
208+
209+ comment = <<-EOS
210+ #-----
211+ #++
212+ # this is text
213+ #-----
214+ EOS
215+
216+ expected = <<-EOS
217+ # this is text
218+ EOS
219+
220+ @parser . remove_private_comments ( comment )
221+
222+ assert_equal expected , comment
223+ end
224+
206225 def test_remove_private_comments_rule
207226 util_parser ''
208227
You can’t perform that action at this time.
0 commit comments