summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-04 05:01:00 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-04 05:01:00 +0000
commit00f34f92741b4092a5f53afff0b9f01679325247 (patch)
tree919ecb181fa2aa4ad694909d55d14d0b191326f0
parent50f6e01b4444aa1a1004278ff3d7b0c1d4978fa2 (diff)
* lib/delegate.rb (Delegator.preserved, DelegateClass.methods): extend
shouldn't be delegated. [ruby-dev:32987], etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/delegate.rb8
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a936c17bd..50509f77ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Feb 4 13:58:42 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/delegate.rb (Delegator.preserved, DelegateClass.methods): extend
+ shouldn't be delegated. [ruby-dev:32987], etc.
+
Mon Feb 4 08:59:31 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/cgi.rb (CGI::QueryExtension::[]): no more transition
diff --git a/lib/delegate.rb b/lib/delegate.rb
index f4068f1b32..970bb9d342 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -115,9 +115,10 @@
# implementation, see SimpleDelegator.
#
class Delegator
- preserved = [:__id__, :object_id, :__send__, :public_send, :respond_to?, :send,
- :instance_eval, :instance_exec,
- ]
+ preserved = [
+ :__id__, :object_id, :__send__, :public_send, :respond_to?, :send,
+ :instance_eval, :instance_exec, :extend,
+ ]
instance_methods.each do |m|
next if preserved.include?(m)
undef_method m
@@ -267,6 +268,7 @@ def DelegateClass(superclass)
:__id__, :object_id, :__send__, :public_send, :respond_to?, :send,
:==, :equal?, :initialize, :method_missing, :__getobj__, :__setobj__,
:clone, :dup, :marshal_dump, :marshal_load, :instance_eval, :instance_exec,
+ :extend,
]
klass.module_eval {
include Delegator::MethodDelegation