diff --git "a/C:\\Users\\LAZARI~1\\AppData\\Local\\Temp\\vm_8193.c" "b/P:\\ri\\sandbox\\rb193\\vm_method.c" index a28bd8e..738f5ec 100644 --- "a/C:\\Users\\LAZARI~1\\AppData\\Local\\Temp\\vm_8193.c" +++ "b/P:\\ri\\sandbox\\rb193\\vm_method.c" @@ -261,6 +261,7 @@ method_added(VALUE klass, ID mid) rb_method_entry_t * rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_flag_t noex) { + int callback = TRUE; /* see #5015 */ rb_thread_t *th; rb_control_frame_t *cfp; int line; @@ -299,12 +300,16 @@ rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_ def->body.optimize_type = (enum method_optimized_type)opts; break; case VM_METHOD_TYPE_ZSUPER: + break; case VM_METHOD_TYPE_UNDEF: + callback = FALSE; break; default: rb_bug("rb_add_method: unsupported method type (%d)\n", type); } - method_added(klass, mid); + if (callback) { + method_added(klass, mid); + } return me; }