diff options
author | Yusuke Endoh <[email protected]> | 2021-07-02 16:45:48 +0900 |
---|---|---|
committer | git <[email protected]> | 2021-07-02 16:48:20 +0900 |
commit | 3a95834739aababba9eac418d7f122a1e499684b (patch) | |
tree | 30d24163b34d9222f50c3077681b6ca3f1ba54b5 /lib | |
parent | e105d93b4fe0dd9984ec34f0c78d5465c33542a7 (diff) |
[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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/error_highlight/core_ext.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/error_highlight/core_ext.rb b/lib/error_highlight/core_ext.rb index d8d2175f8a..1e91debc0c 100644 --- a/lib/error_highlight/core_ext.rb +++ b/lib/error_highlight/core_ext.rb @@ -29,7 +29,7 @@ module ErrorHighlight spot = ErrorHighlight.spot(node, **opts) - rescue Errno::ENOENT + rescue Errno::ENOENT, SyntaxError end if spot |