summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-12-19 03:40:44 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-12-19 03:51:37 +0900
commitacac2b8128980b97c64b4d057acdf2ceffb0b981 (patch)
treebae29bfb63407ab9f9cccc3c57070ac99fdfe879 /lib
parent7e0e6f90744ec89a87554d209fb797ddf7919319 (diff)
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 64ac984129a7a4645efe5ac57c168ef880b479b2.
Diffstat (limited to 'lib')
-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 ebb6788b02..0bf1992f49 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 SystemCallError, SyntaxError
+ rescue SystemCallError, SyntaxError, ArgumentError
end
if spot