mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/delegate.rb (Delegator::initialize): use Object#class
instead of deprecated Object#type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3a76a40196
commit
55af6c2f96
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Oct 3 00:27:26 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* lib/delegate.rb (Delegator::initialize): use Object#class
|
||||||
|
instead of deprecated Object#type.
|
||||||
|
|
||||||
Wed Oct 2 23:32:48 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Wed Oct 2 23:32:48 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* configure.in (RUBY_CHECK_IO_NEED_FLUSH): check whether fflush()
|
* configure.in (RUBY_CHECK_IO_NEED_FLUSH): check whether fflush()
|
||||||
|
@ -41,7 +46,7 @@ Wed Oct 2 10:59:29 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
* gc.c (gc_sweep): free unused heap page to reduce process size if
|
* gc.c (gc_sweep): free unused heap page to reduce process size if
|
||||||
possible.
|
possible.
|
||||||
|
|
||||||
* object.c (rb_obj_type): deperecated Object#type; use Object#class.
|
* object.c (rb_obj_type): depercated Object#type; use Object#class.
|
||||||
|
|
||||||
Tue Oct 1 23:48:32 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Tue Oct 1 23:48:32 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Delegator
|
||||||
def initialize(obj)
|
def initialize(obj)
|
||||||
preserved = ::Kernel.instance_methods
|
preserved = ::Kernel.instance_methods
|
||||||
preserved -= ["to_s","to_a","inspect","==","=~","==="]
|
preserved -= ["to_s","to_a","inspect","==","=~","==="]
|
||||||
for t in self.type.ancestors
|
for t in self.class.ancestors
|
||||||
preserved |= t.instance_methods
|
preserved |= t.instance_methods
|
||||||
preserved |= t.private_instance_methods
|
preserved |= t.private_instance_methods
|
||||||
preserved |= t.protected_instance_methods
|
preserved |= t.protected_instance_methods
|
||||||
|
@ -111,7 +111,7 @@ if __FILE__ == $0
|
||||||
end
|
end
|
||||||
|
|
||||||
ary = ExtArray.new
|
ary = ExtArray.new
|
||||||
p ary.type
|
p ary.class
|
||||||
ary.push 25
|
ary.push 25
|
||||||
p ary
|
p ary
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue