File tree Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 1- === 3.10 / ??
1+ === 3.11 / 2011/10-17
2+
3+ * Bug fixes
4+ * Avoid parsing TAGS files included in gems. Issue #81 by Santiago
5+ Pastorino.
6+
7+ === 3.10 / 2011-10-08
28
39* Major enhancements
410 * RDoc HTML output has been improved:
Original file line number Diff line number Diff line change @@ -30,3 +30,7 @@ API changes to RDoc
3030 * Rename Context to Container
3131 * Rename NormalClass to Class
3232
33+ === Crazy Ideas
34+
35+ * Auto-normalize heading levels to look OK. It's weird to see an <h1> in
36+ the middle of a method section.
Original file line number Diff line number Diff line change @@ -402,11 +402,16 @@ def parse_files files
402402 end
403403
404404 ##
405- # Removes file extensions known to be unparseable from +files+
405+ # Removes file extensions known to be unparseable from +files+ and TAGS
406+ # files for emacs and vim.
406407
407408 def remove_unparseable files
408409 files . reject do |file |
409- file =~ /\. (?:class|eps|erb|scpt\. txt|ttf|yml)$/i
410+ file =~ /\. (?:class|eps|erb|scpt\. txt|ttf|yml)$/i or
411+ ( file =~ /tags$/i and
412+ open ( file , 'rb' ) { |io |
413+ io . read ( 100 ) =~ /\A (\f \n [^,]+,\d +$|!_TAG_)/
414+ } )
410415 end
411416 end
412417
Original file line number Diff line number Diff line change @@ -122,6 +122,34 @@ def test_remove_unparseable
122122 assert_empty @rdoc . remove_unparseable file_list
123123 end
124124
125+ def test_remove_unparseable_tags_emacs
126+ temp_dir do
127+ open 'TAGS' , 'w' do |io | # emacs
128+ io . write "\f \n lib/foo.rb,43\n "
129+ end
130+
131+ file_list = %w[
132+ TAGS
133+ ]
134+
135+ assert_empty @rdoc . remove_unparseable file_list
136+ end
137+ end
138+
139+ def test_remove_unparseable_tags_vim
140+ temp_dir do
141+ open 'TAGS' , 'w' do |io | # emacs
142+ io . write "!_TAG_"
143+ end
144+
145+ file_list = %w[
146+ TAGS
147+ ]
148+
149+ assert_empty @rdoc . remove_unparseable file_list
150+ end
151+ end
152+
125153 def test_setup_output_dir
126154 Dir . mktmpdir { |d |
127155 path = File . join d , 'testdir'
You can’t perform that action at this time.
0 commit comments