1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2004-03-31 02:52:44 +00:00
parent bbf04edb38
commit fbbdeb9b57
2 changed files with 12 additions and 7 deletions

View file

@ -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>

View file

@ -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