1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make RubyVM::AbstractSyntaxTree.of raise for backtrace location in eval

This check is needed to fix a bug of error_highlight when NameError
occurred in eval'ed code.
https://github.com/ruby/error_highlight/pull/16

The same check for proc/method has been already introduced since
64ac984129.
This commit is contained in:
Yusuke Endoh 2021-12-19 03:40:44 +09:00
parent 7e0e6f9074
commit acac2b8128
5 changed files with 62 additions and 23 deletions

View file

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