Rb_clear_cache_by_class

e$B0J2<$NI=L@$O@5$7$$$G$7$g$&$+e(B?

e$B$D$^$j!“e(Brb_clear_cache_by_class e$B$K$*$$$Fe(B ent->method
e$B$,e(B 0 e$B$Ge(B
e$B$J$$$H$-!”$=$l$Oe(B T_NONE e$B$G$O$J$$$O$:$G$7$g$&$+!#e(B

Index: eval_method.ci

— eval_method.ci (revision 13485)
+++ eval_method.ci (working copy)
@@ -72,6 +72,7 @@
}
}

+#include <assert.h>
void
rb_clear_cache_by_class(VALUE klass)
{
@@ -84,6 +85,7 @@
ent = cache;
end = ent + CACHE_SIZE;
while (ent < end) {

  •    if (ent->method) assert(TYPE(ent->method) != T_NONE);
    
    if ((ent->klass == klass) ||
    (ent->method && ent->method->nd_clss == klass)) {
    ent->mid = 0;

e$B0J2<$N$h$&$K$9$l$P!"$=$NI=L@$r<:GT$5$;$k$3$H$,$G$-$^$9!#e(B

% ./ruby -ve ’
3.times {
o = Object.new
def o.a() end
o.a
GC.start
}

ruby 1.9.0 (2007-09-22 patchlevel 0) [i686-linux]
ruby: eval_method.ci:88: rb_clear_cache_by_class: Assertion
`rb_type((VALUE)(ent->method)) != RUBY_T_NONE’ failed.