diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-19 14:22:27 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-19 14:22:27 +0000 |
commit | d102ce6d09908fef31b2728abfa81de05aa4239b (patch) | |
tree | dc7913c0f26455b734eea5817356f240eaa20888 /eval.c | |
parent | e664d467a92df0e7655c453c0eda9bc7fd1e1884 (diff) |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@2006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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) { |