diff options
author | Yusuke Endoh <[email protected]> | 2025-05-02 17:12:15 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2025-06-18 14:51:56 +0900 |
commit | 10767283dd0277a1d780790ce6bde67cf2c832a2 (patch) | |
tree | a4c98d6d1f8a46d80c2f3aa1cbc3c4d9d9f3d57c /lib/rexml/parsers/lightparser.rb | |
parent | ca10c521ff748bded89e481ab3f1767a8e56a71c (diff) |
Exclude internal frames from backtrace
This changeset suppresses backtrace locations like
`<internal:array>:211` as much as possible.
Before the patch:
```
$ ruby -e '[1].fetch_values(42)'
<internal:array>:211:in 'Array#fetch': index 42 outside of array bounds: -1...1 (IndexError)
from <internal:array>:211:in 'block in Array#fetch_values'
from <internal:array>:211:in 'Array#map!'
from <internal:array>:211:in 'Array#fetch_values'
from -e:1:in '<main>'
```
After the patch:
```
$ ./miniruby -e '[1].fetch_values(42)'
-e:1:in 'Array#fetch_values': index 42 outside of array bounds: -1...1 (IndexError)
from -e:1:in '<main>'
```
Specifically:
* The special backtrace handling of BUILTIN_ATTR_C_TRACE is now always
applied to frames with `<internal:...>`.
* When multiple consecutive internal frames appear, all but the bottom
(caller-side) frame are removed.
[Misc #20968]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13238
Diffstat (limited to 'lib/rexml/parsers/lightparser.rb')
0 files changed, 0 insertions, 0 deletions