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

10 commits

Author SHA1 Message Date
Christian Boos
11b1ebe606 [ruby/error_highlight] Fix the spurious TypeError.
When we have no backtrace locations, we can't have the highlight,
so just return the message.

9f5c639494
2022-01-04 23:09:01 +09:00
Yusuke Endoh
52b1c76534 Manually sync d2140d795a 2021-12-19 04:13:14 +09:00
Yusuke Endoh
acac2b8128 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.
2021-12-19 03:51:37 +09:00
Yusuke Endoh
dc46529b64 [ruby/error_highlight] Ignore all syscall errors
At least, Error::ENOTSUP may be raised on some extreme environments

2787983ff7
2021-11-30 13:49:04 +09:00
Yusuke Endoh
cad83fa3c4 ast.c: Rename "save_script_lines" to "keep_script_lines"
... as per ko1's preference. He is preparing to extend this feature to
ISeq for his new debugger. He prefers "keep" to "save" for this wording.
This API is internal and not included in any released version, so I
change it in advance.
2021-08-20 16:18:36 +09:00
Yusuke Endoh
3a95834739 [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.

b1572761a6
2021-07-02 16:48:20 +09:00
Yusuke Endoh
ca4e5b1eb3 [ruby/error_highlight] Reconsider the API of ErrorHighlight.spot
acb2046a82
2021-06-30 12:49:27 +09:00
Yusuke Endoh
f428ced69c [ruby/error_highlight] Experimentally support a custom formatter
f40a1de20e
2021-06-30 12:49:18 +09:00
Yusuke Endoh
db7e9b1aac [ruby/error_highlight] Add some comments
e0c90c72c3
2021-06-30 11:46:47 +09:00
Yusuke Endoh
9438c99590 Rename error_squiggle to error_highlight 2021-06-29 23:45:49 +09:00
Renamed from lib/error_squiggle/core_ext.rb (Browse further)