summaryrefslogtreecommitdiff
path: root/lib/delegate.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-03-24 08:52:35 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-03-24 08:52:35 +0000
commit35247a52ef719584a59ae9c518523f0ee825c8e3 (patch)
treee14e2a884d3c40a86f93b8dcb4ec144f510fe35a /lib/delegate.rb
parent1727010a3abf84fd06f0e44d44b1b8ef6cde588e (diff)
990324
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/delegate.rb')
-rw-r--r--lib/delegate.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb
index 0771f2f..29f2a5d 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -34,14 +34,8 @@ class Delegator
begin
__getobj__.__send__(:#{method}, *args, &block)
rescue Exception
- c = -caller(0).size
- if /:in `__getobj__'$/ =~ $@[c-1] #`
- n = 1
- else
- c -= 1
- n = 2
- end
- $@[c,n] = nil
+ $@.delete_if{|s| /:in `__getobj__'$/ =~ s} #`
+ $@.delete_if{|s| /^\\(eval\\):/ =~ s}
raise
end
end