summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-31 02:52:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-31 02:52:44 +0000
commitfbbdeb9b577159d2481689d538d9b2437c04f220 (patch)
tree1f655b2cd53dab8c5129e069dfe60ce641713692
parentbbf04edb3821897a843406dff552b7643d5a3218 (diff)
* lib/delegate.rb (DelegateClass): define internal methods of the
result class, but not metaclass of the caller. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--lib/delegate.rb8
2 files changed, 12 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f61bb398e..99f9ab9560 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 31 11:52:26 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/delegate.rb (DelegateClass): define internal methods of the
+ result class, but not metaclass of the caller.
+
Tue Mar 30 20:25:34 2004 Tanaka Akira <akr@m17n.org>
* time.c (search_time_t): limit guess range by mktime if it is
@@ -19,7 +24,7 @@ Sat Mar 27 10:40:48 2004 Tanaka Akira <akr@m17n.org>
Thu Mar 25 23:15:24 2004 Dave Thomas <dave@pragprog.com>
- * lib/rdoc/ri/ri_options.rb (RI::Options::show_version):
+ * lib/rdoc/ri/ri_options.rb (RI::Options::show_version):
Add --version option
Thu Mar 25 04:16:18 2004 Dave Thomas <dave@pragprog.com>
@@ -35,7 +40,7 @@ Thu Mar 25 03:57:47 2004 Dave Thomas <dave@pragprog.com>
Thu Mar 25 02:00:18 2004 Dave Thomas <dave@pragprog.com>
- * lib/rdoc/generators/template/html/one_page_html.rb (Page):
+ * lib/rdoc/generators/template/html/one_page_html.rb (Page):
Fix to work with C modules.
Wed Mar 24 21:17:00 2004 Gavin Sinclair <gsinclair@soyabean.com.au>
@@ -48,7 +53,7 @@ Wed Mar 24 21:17:00 2004 Gavin Sinclair <gsinclair@soyabean.com.au>
* lib/uri/https.rb: Ditto.
* lib/uri/ldap.rb: Ditto.
* lib/uri/mailto.rb: Ditto.
- (All backported from 1.9)
+ (All backported from 1.9)
Wed Mar 24 18:48:26 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
diff --git a/lib/delegate.rb b/lib/delegate.rb
index 0069109624..3bbd148e74 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -91,6 +91,9 @@ def DelegateClass(superclass)
def initialize(obj)
@_dc_obj = obj
end
+ def __getobj__
+ @_dc_obj
+ end
EOS
for method in methods
begin
@@ -108,10 +111,7 @@ def DelegateClass(superclass)
raise NameError, "invalid identifier %s" % method, caller(3)
end
end
- def __getobj__
- @_dc_obj
- end
- return klass;
+ return klass
end
if __FILE__ == $0