aboutsummaryrefslogtreecommitdiffstats
path: root/lib/forwardable.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-11 00:31:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-11 00:31:30 +0000
commit2cd23467fece5c4dfcaa0aba30065d1b48a890e0 (patch)
tree510684b50e9cb833629224c22cabdc50b7729805 /lib/forwardable.rb
parenta3c5ff47c05e8c7583f016b4275351eee1cd060b (diff)
downloadruby-2cd23467fece5c4dfcaa0aba30065d1b48a890e0.tar.gz
forwardable.rb: backtrace
* 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/trunk@55372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/forwardable.rb')
-rw-r--r--lib/forwardable.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/forwardable.rb b/lib/forwardable.rb
index cd88538ef7..26c5bf7463 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, <tt>__FILE__</tt> will remain in the backtrace in the event an
- # Exception is raised.
+ # ignored
attr_accessor :debug
end
@@ -204,8 +201,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