From: shugo@... Date: 2015-10-23T15:36:13+00:00 Subject: [ruby-core:71175] [Ruby trunk - Bug #11615] [Open] Forwardable fails to adjust backtrace when Exception is defined in the target class Issue #11615 has been reported by Shugo Maeda. ---------------------------------------- Bug #11615: Forwardable fails to adjust backtrace when Exception is defined in the target class https://bugs.ruby-lang.org/issues/11615 * Author: Shugo Maeda * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- Forwardable fails to adjust backtrace when Exception is defined in the target class as follows: ``` $ cat t.rb require "forwardable" class Foo extend Forwardable def_delegator :bar, :baz class Exception end end Foo.new.baz $ ruby t.rb /home/shugo/local/lib/ruby/2.3.0/forwardable.rb:183:in `baz': undefined local variable or method `bar' for # (NameError) Did you mean? baz from t.rb:12:in `
' ``` Without the definition of Foo::Exception, backtrace is shown as follows: ``` $ ruby t.rb t.rb:12:in `
': undefined local variable or method `bar' for # (NameError) Did you mean? baz ``` -- https://bugs.ruby-lang.org/