diff options
-rw-r--r-- | vm_method.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_method.c b/vm_method.c index 2b51605433..037ac2a655 100644 --- a/vm_method.c +++ b/vm_method.c @@ -136,6 +136,7 @@ static void clear_method_cache_by_id_in_class(VALUE klass, ID mid) { VM_ASSERT(RB_TYPE_P(klass, T_CLASS) || RB_TYPE_P(klass, T_ICLASS)); + if (!(RB_TYPE_P(klass, T_CLASS) || RB_TYPE_P(klass, T_ICLASS))) rb_bug("type confusion"); // temporary. Remove before release if (LIKELY(RCLASS_EXT(klass)->subclasses == NULL)) { // no subclasses |