summaryrefslogtreecommitdiff
path: root/lib/error_highlight/core_ext.rb
AgeCommit message (Collapse)Author
2025-12-17[ruby/error_highlight] Show no message when failing to get caller/callee ↵Yusuke Endoh
snippets Even with Ruby 4.0, snippets is not always available, such as in irb by default. It would be better to just say nothing than to show a confusing message. https://github.com/ruby/error_highlight/commit/ef80ce73a1
2025-11-12[ruby/error_highlight] Replace Ruby 3.5 with Ruby 4.0Yasuo Honda
This commit updates the Ruby version to follow the commit in Ruby master branch. https://github.com/ruby/ruby/commit/6d81969b475262aba251e99b518181bdf7c5a523 https://github.com/ruby/error_highlight/commit/dcecf68d75
2025-10-30[ruby/error_highlight] Support cases where there are multiple missing / ↵Aaron Patterson
wrong kwargs This commit fixes the case when there are multiple missing or incorrect keywords provided to a method. Without this fix, ErrorHighlight itself will raise an exception https://github.com/ruby/error_highlight/commit/8bde92b36e
2025-10-07[ruby/error_highlight] Improve English comments and messagesYusuke Endoh
https://github.com/ruby/error_highlight/commit/5f976265ef
2025-08-28[ruby/error_highlight] Show a dedicated snippet for "wrong number of ↵Yusuke Endoh
arguments" error This is an experimental implementation for https://bugs.ruby-lang.org/issues/21543. ``` test.rb:2:in 'Object#foo': wrong number of arguments (given 1, expected 2) (ArgumentError) caller: test.rb:6 | foo(1) ^^^ callee: test.rb:2 | def foo(x, y) ^^^ from test.rb:6:in 'Object#bar' from test.rb:10:in 'Object#baz' from test.rb:13:in '<main>' ``` https://github.com/ruby/error_highlight/commit/21e974e1c4
2022-11-14[ruby/error_highlight] Enable ErrorHighlight for TypeError/ArgumentError ↵Yusuke Endoh
only after Ruby 3.2 ... because changing TypeError#message and ArgumentError#message is highly incompatible. https://github.com/ruby/error_highlight/commit/39aa897c7a
2022-08-19[ruby/error_highlight] Apply ErrorHighlight::CoreExt to TypeError and ↵Yusuke Endoh
ArgumentError https://github.com/ruby/error_highlight/commit/defcaf1beb
2022-08-10[ruby/error_highlight] Make ErrorHighlight.spot accept Exception ↵Yusuke Endoh
(https://github.com/ruby/error_highlight/pull/25) ... and move things from core_ext.rb to base.rb. This will confine CRuby-dependent things to ErrorHighlight.spot. https://github.com/ruby/error_highlight/commit/22d1dd7824
2022-06-07[ruby/error_highlight] Use Exception#detailed_message instead of overriding ↵Yusuke Endoh
#message (https://github.com/ruby/error_highlight/pull/24) See https://bugs.ruby-lang.org/issues/18564. Ref: https://github.com/ruby/did_you_mean/pull/177 https://github.com/ruby/error_highlight/commit/671b7c61b2
2022-01-04[ruby/error_highlight] Fix the spurious TypeError.Christian Boos
When we have no backtrace locations, we can't have the highlight, so just return the message. https://github.com/ruby/error_highlight/commit/9f5c639494
2021-12-19Manually sync ↵Yusuke Endoh
https://github.com/ruby/error_highlight/commit/d2140d795ad0a06398db81739201877d431755db
2021-12-19Make RubyVM::AbstractSyntaxTree.of raise for backtrace location in evalYusuke Endoh
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.
2021-11-30[ruby/error_highlight] Ignore all syscall errorsYusuke Endoh
At least, Error::ENOTSUP may be raised on some extreme environments https://github.com/ruby/error_highlight/commit/2787983ff7
2021-08-20ast.c: Rename "save_script_lines" to "keep_script_lines"Yusuke Endoh
... 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-07-02[ruby/error_highlight] Suppress SyntaxError during RubyVM::AST.ofYusuke Endoh
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
2021-06-30[ruby/error_highlight] Reconsider the API of ErrorHighlight.spotYusuke Endoh
https://github.com/ruby/error_highlight/commit/acb2046a82
2021-06-30[ruby/error_highlight] Experimentally support a custom formatterYusuke Endoh
https://github.com/ruby/error_highlight/commit/f40a1de20e
2021-06-30[ruby/error_highlight] Add some commentsYusuke Endoh
https://github.com/ruby/error_highlight/commit/e0c90c72c3
2021-06-29Rename error_squiggle to error_highlightYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/4586