diff --git a/History.rdoc b/History.rdoc index 54d6c4bea0..1e0ce84e12 100644 --- a/History.rdoc +++ b/History.rdoc @@ -6,6 +6,7 @@ by Daniel Svensson. * Parse rb_intern_const correctly in C. PR #381 by Sho Hashimoto. * Fix broken assets caused by #335 when serving ri. PR #360 by Alex Wood. + * Don't try to parse svg files. Issue #350 by Sigurd Svela. === 4.2.2 / 2016-02-09 diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 7c5d34e089..89ba6619aa 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -437,7 +437,7 @@ def parse_files files def remove_unparseable files files.reject do |file| - file =~ /\.(?:class|eps|erb|scpt\.txt|ttf|yml)$/i or + file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or (file =~ /tags$/i and open(file, 'rb') { |io| io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/ diff --git a/test/test_rdoc_rdoc.rb b/test/test_rdoc_rdoc.rb index 793580de86..b87f44b652 100644 --- a/test/test_rdoc_rdoc.rb +++ b/test/test_rdoc_rdoc.rb @@ -300,6 +300,7 @@ def test_remove_unparseable blah.eps blah.erb blah.scpt.txt + blah.svg blah.ttf blah.yml ]