Issue #6216 has been updated by Cody Cutrer.


I can confirm that this is working on current master, but with one problem - if the exception is ever rescued and then re-raised (even with just a plain `raise`, not `raise e` or anything), the backtrace is reset to where it's re-raised from. I'm forced to comment out the entire rescue block for each one to find the true source

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-47421

* Author: Hal Brodigan
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Category: core
* Target version: next minor
----------------------------------------
When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.

---Files--------------------------------
stack-overflow.patch (630 Bytes)


-- 
https://bugs.ruby-lang.org/