diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rdoc/markup/to_html.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rdoc/markup/to_html.rb b/lib/rdoc/markup/to_html.rb index 3bf66c2c31..aa5de7bf66 100644 --- a/lib/rdoc/markup/to_html.rb +++ b/lib/rdoc/markup/to_html.rb @@ -383,9 +383,12 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter # Returns true if text is valid ruby syntax def parseable? text + verbose, $VERBOSE = $VERBOSE, nil eval("BEGIN {return true}\n#{text}") rescue SyntaxError false + ensure + $VERBOSE = verbose end ## |