Skip to content

Commit 091e98e

Browse files
author
Zachary Scott
authored
Merge pull request #440 from nobu/bug/warnings-in-eval
Suppress warnings in eval
2 parents 7b660d0 + 1c5af02 commit 091e98e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/rdoc/markup/to_html.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,12 @@ def list_end_for(list_type)
383383
# Returns true if text is valid ruby syntax
384384

385385
def parseable? text
386+
verbose, $VERBOSE = $VERBOSE, nil
386387
eval("BEGIN {return true}\n#{text}")
387388
rescue SyntaxError
388389
false
390+
ensure
391+
$VERBOSE = verbose
389392
end
390393

391394
##

0 commit comments

Comments
 (0)