rdoc/rdoc — pull request #333 by jeremyevans (2014-11-26 17:25:15+00:00)
Title: Use a real parser for RDoc::Markup::ToHtml#parseable? (Fixes #320)

This uses BEGIN {return true} when evaluating the text, which will do
a syntax check, but not actually execute the code.

Using a real ruby parser is a big improvement for two reasons.
First, it highlights valid ruby syntax that was left unhighlighted
by the previous parser. Second and more important, it doesn't
highlight invalid ruby syntax, which makes it easier to catch
errors in example code in the documentation. This even fixes some
errors in the tests, where code like "class C end" was considered
valid syntax.

There is some fallout in the tests where code that wasn't highlighted
before is now highlighted, this also fixes those cases so the tests
pass.