From bec19f4962ab3ef773f016761e1761ddf516e0b9 Mon Sep 17 00:00:00 2001 From: usa Date: Sun, 18 Mar 2018 15:04:49 +0000 Subject: merge revision(s) 55372: [Backport #14179] * lib/forwardable.rb (_delegator_method): leave the backtrace untouched during accessor. forwardable.rb does not appear in the backtrace during delegated method because of tail-call optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/forwardable.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/forwardable.rb b/lib/forwardable.rb index e78b9ed1e0..e2b210423f 100644 --- a/lib/forwardable.rb +++ b/lib/forwardable.rb @@ -113,12 +113,9 @@ module Forwardable # Version of +forwardable.rb+ FORWARDABLE_VERSION = "1.1.0" - FILE_REGEXP = %r"#{Regexp.quote(__FILE__)}" - @debug = nil class << self - # If true, __FILE__ will remain in the backtrace in the event an - # Exception is raised. + # ignored attr_accessor :debug end @@ -203,8 +200,6 @@ module Forwardable def #{ali}(*args, &block) begin #{accessor} - ensure - $@.delete_if {|s| ::Forwardable::FILE_REGEXP =~ s} if $@ and !::Forwardable::debug end.__send__ :#{method}, *args, &block end end -- cgit v1.2.3