ruby-changes:68541
From: Yusuke <ko1@a...>
Date: Wed, 20 Oct 2021 11:06:05 +0900 (JST)
Subject: [ruby-changes:68541] 7c01cf4908 (master): NEWS.md: Add error_highlight section
https://git.ruby-lang.org/ruby.git/commit/?id=7c01cf4908 From 7c01cf49083992bc61ec9703b6fb4bc588701c00 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Wed, 20 Oct 2021 11:05:05 +0900 Subject: NEWS.md: Add error_highlight section --- NEWS.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/NEWS.md b/NEWS.md index 2bc3ccb48a..59628a8c02 100644 --- a/NEWS.md +++ b/NEWS.md @@ -218,6 +218,9 @@ Excluding feature bug fixes. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L218 ### TypeProf +* [Experimental IDE support](https://github.com/ruby/typeprof/blob/master/doc/ide.md) has been implemented. +* Many bug fixes and performance improvements since Ruby 3.0.0. + ## Debugger * A new debugger [debug.gem](https://github.com/ruby/debug) is bundled. @@ -228,6 +231,24 @@ Excluding feature bug fixes. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L231 * `rdbg` command is also installed into `bin/` directory to start and control debugging execution. +## error_highlight + +A built-in gem, error_highlight, has been introduced. +It includes fine-grained error location in backtrace: + +``` +$ ruby test.rb +test.rb:1:in `<main>': undefined method `time' for 1:Integer (NoMethodError) + +1.time {} + ^^^^^ +Did you mean? times +``` + +This gem is enabled by default. +You can disable it by using a command-line option `--disable-error_highlight`. +See [the repository](https://github.com/ruby/error_highlight) in detail. + ## Miscellaneous changes * lib/objspace/trace.rb is added, which is a tool for tracing the object -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/