From: sawadatsuyoshi@... Date: 2020-03-10T16:00:54+00:00 Subject: [ruby-core:97435] [Ruby master Feature#16684] Use the word "to" instead of "from" in backtrace Issue #16684 has been reported by sawa (Tsuyoshi Sawada). ---------------------------------------- Feature #16684: Use the word "to" instead of "from" in backtrace https://bugs.ruby-lang.org/issues/16684 * Author: sawa (Tsuyoshi Sawada) * Status: Open * Priority: Normal ---------------------------------------- The most-recent-call-last order of backtrace introduced by #8661: ```ruby def a; raise end def b; a end def c; b end c ``` ``` Traceback (most recent call last): 3: from foo.rb:4:in `
' 2: from foo.rb:3:in `c' 1: from foo.rb:2:in `b' foo.rb:1:in `a': unhandled exception ``` is intuitive, and I hope it is retained. However, there are people complaining that it is confusing. I believe the unnaturalness is (at least partly) due to the fact that the word "from" is used, which made sense when backtrace was displayed in most-recent-call-first order, ``` foo.rb:1:in `a': unhandled exception 1: from foo.rb:2:in `b' 2: from foo.rb:3:in `c' 3: from foo.rb:4:in `
' ``` but not any more. Here, my understanding is that "from" means that that line was called **from** the next line displayed in the backtrace. I propose that, so long as the most-recent-call-last order is adopted, the word "to" should be used rather than "from": ``` Traceback (most recent call last): 3: to foo.rb:4:in `
' 2: to foo.rb:3:in `c' 1: to foo.rb:2:in `b' foo.rb:1:in `a': unhandled exception ``` -- https://bugs.ruby-lang.org/ Unsubscribe: