[ruby/error_highlight] Suppress SyntaxError during RubyVM::AST.of

When the original source code is erb, RubyVM::AST.of does not work well.
https://github.com/rails/rails/issues/42678.

https://github.com/ruby/error_highlight/commit/b1572761a6
This commit is contained in:
Yusuke Endoh 2021-07-02 16:45:48 +09:00 committed by git
parent e105d93b4f
commit 3a95834739

View File

@ -29,7 +29,7 @@ module ErrorHighlight
spot = ErrorHighlight.spot(node, **opts)
rescue Errno::ENOENT
rescue Errno::ENOENT, SyntaxError
end
if spot