summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-14 04:55:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-14 04:55:53 +0000
commita1a693e138392467ca74fb4ba5b071dd7675960e (patch)
tree7586388b543e40af025fa9e03a63b442eb254009 /lib
parentd453b1a042a4483e74b17d66c7d88ec0c60b964a (diff)
signal delivered to main_thread
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/delegate.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb
index a4bbe06..c73a3bd 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -13,12 +13,12 @@
class Delegator
def initialize(obj)
+ preserved = ::Kernel.instance_methods
for t in self.type.ancestors
preserved |= t.instance_methods
break if t == Delegator
end
- preserved |= ::Kernel.instance_methods
- preserved -= ["to_s", "nil?", "to_a", "hash", "dup", "==", "=~"]
+ preserved -= ["__getobj__","to_s","nil?","to_a","hash","dup","==","=~"]
for method in obj.methods
next if preserved.include? method
eval "def self.#{method}(*args,&block); __getobj__.__send__(:#{method}, *args,&block); end"