aboutsummaryrefslogtreecommitdiffstats
path: root/lib/error_highlight
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-07-02 16:45:48 +0900
committergit <svn-admin@ruby-lang.org>2021-07-02 16:48:20 +0900
commit3a95834739aababba9eac418d7f122a1e499684b (patch)
tree30d24163b34d9222f50c3077681b6ca3f1ba54b5 /lib/error_highlight
parente105d93b4fe0dd9984ec34f0c78d5465c33542a7 (diff)
downloadruby-3a95834739aababba9eac418d7f122a1e499684b.tar.gz
[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/error_highlight')
-rw-r--r--lib/error_highlight/core_ext.rb2
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