diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-14 06:18:59 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-14 06:18:59 +0000 |
commit | a1c02ee495d945f943fedc3f11fcb323289dc756 (patch) | |
tree | 258fdf9c591ffa5bab8d8be49302198241eb4fa7 /lib/delegate.rb | |
parent | e60d5563210cccef2e9da17970ab3ea1906a8185 (diff) | |
download | ruby-a1c02ee495d945f943fedc3f11fcb323289dc756.tar.gz |
* math.c (math_acos): check errno after operation. ditto for
asin, acosh, atanh, log, log10 and sqrt.
* eval.c (rb_add_method): initialize should always be private.
* parse.y (expr): add rescue modifier rule.
* parse.y (command_call): return, break and next with argument is
now part of this rule.
* parse.y (yylex): "a" in "a /5" should be considered as a local
variable. [experimental]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/delegate.rb')
-rw-r--r-- | lib/delegate.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb index afd6a2abe8..707bc2144b 100644 --- a/lib/delegate.rb +++ b/lib/delegate.rb @@ -19,10 +19,10 @@ class Delegator def initialize(obj) - preserved = ::Kernel.instance_methods + preserved = ::Kernel.public_instance_methods preserved -= ["to_s","to_a","inspect","==","=~","==="] for t in self.class.ancestors - preserved |= t.instance_methods + preserved |= t.public_instance_methods preserved |= t.private_instance_methods preserved |= t.protected_instance_methods break if t == Delegator @@ -76,8 +76,8 @@ SimpleDelegater = SimpleDelegator # def DelegateClass(superclass) klass = Class.new - methods = superclass.instance_methods(true) - methods -= ::Kernel.instance_methods + methods = superclass.public_instance_methods(true) + methods -= ::Kernel.public_instance_methods methods |= ["to_s","to_a","inspect","==","=~","==="] klass.module_eval <<-EOS def initialize(obj) |