Bug #3283
SystemStackError Backtrace returns String not Array
| Status: | Closed | Start date: | 05/13/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | core | |||
| Target version: | 1.9.2 | |||
| ruby -v: | ruby 1.9.3dev (2010-05-12 trunk 27763) [x86_64-darwin10] |
Description
In this commit http://github.com/shyouhei/ruby/commit/ecd11fb371b5f4a00d0b0006b325de3c5437b8d2 changes were introduced that affected how SystemStackError's backtrace was handled. The changes resulted in SystemStackError's backtrace returning a String instead of an Array. However, previously all backtraces have been Arrays. All available documentation supports this notion and numerous Ruby project, including Rails have relied on the backtrace being an Array. Even if the backtrace is going to be truncated as a single line, it should still be returned as a single element Array.
Associated revisions
* eval.c (setup_exception): let SystemStackError#backtrace return an
single element array instead of string itself. [ruby-core:30196]
History
Updated by ernie (Ernie Miller) about 2 years ago
Seconded. Returning two different types of data in a backtrace needlessly complicates error handling code.
Updated by mame (Yusuke Endoh) about 2 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r27848. Peter, thank you for reporting this issue. Your contribution to Ruby is greatly appreciated. May Ruby be with you.