Open
Description
throws an exception - unexpected return (LocalJumpError)
text = "not_ruby"
def parseable? text
verbose, $VERBOSE = $VERBOSE, nil
eval("BEGIN {return true}\n#{text}")
rescue SyntaxError
false
ensure
$VERBOSE = verbose
end
content = if parseable? text then
"parseable"
end
puts content
suprisingly MRI Ruby returns parseable
which is obviously not
The code about is simplified version of this https://github.com/ruby/rdoc/blob/master/lib/rdoc/markup/to_html.rb#L214