Skip to content

Commit

Permalink
Suppress SyntaxError during RubyVM::AST.of
Browse files Browse the repository at this point in the history
When the original source code is erb, RubyVM::AST.of does not work well.
rails/rails#42678.
  • Loading branch information
mame committed Jul 2, 2021
1 parent 2dca144 commit b157276
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/error_highlight/core_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def to_s

spot = ErrorHighlight.spot(node, **opts)

rescue Errno::ENOENT
rescue Errno::ENOENT, SyntaxError
end

if spot
Expand Down

0 comments on commit b157276

Please sign in to comment.