From 3a95834739aababba9eac418d7f122a1e499684b Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Fri, 2 Jul 2021 16:45:48 +0900 Subject: [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 --- lib/error_highlight/core_ext.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/error_highlight') 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 -- cgit v1.2.3