From cdd39077b6ec522d084c3ed415edc4f5aaa23734 Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 19 Jan 2002 14:22:27 +0000 Subject: * eval.c (rb_eval): need not to clar method cache for NODE_CLASS, NODE_SCLASS. * gc.c (obj_free): need not to clear method cache on class/module finalization. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index ee6ed1ac4..c2470cf40 100644 --- a/eval.c +++ b/eval.c @@ -190,7 +190,7 @@ static struct cache_entry cache[CACHE_SIZE]; void rb_clear_cache() { - struct cache_entry *ent, *end; + struct cache_entry *ent, *end; ent = cache; end = ent + CACHE_SIZE; while (ent < end) { @@ -3239,7 +3239,6 @@ rb_eval(self, n) if (rb_safe_level() >= 4) { rb_raise(rb_eSecurityError, "extending class prohibited"); } - rb_clear_cache(); } else { override_class: @@ -3306,9 +3305,6 @@ rb_eval(self, n) } if (rb_safe_level() >= 4 && !OBJ_TAINTED(klass)) rb_raise(rb_eSecurityError, "Insecure: can't extend object"); - if (FL_TEST(CLASS_OF(klass), FL_SINGLETON)) { - rb_clear_cache(); - } klass = rb_singleton_class(klass); if (ruby_wrapper) { -- cgit