Project

General

Profile

Bug #5015 ยป method_added_callback.diff

lazaridis.com (Lazaridis Ilias), 07/12/2011 04:18 AM

View differences:

"b/P:\\ri\\sandbox\\rb193\\vm_method.c"
261 261
rb_method_entry_t *
262 262
rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_flag_t noex)
263 263
{
264
    int callback = TRUE; /* see #5015 */
264 265
    rb_thread_t *th;
265 266
    rb_control_frame_t *cfp;
266 267
    int line;
......
299 300
	def->body.optimize_type = (enum method_optimized_type)opts;
300 301
	break;
301 302
      case VM_METHOD_TYPE_ZSUPER:
303
	break;
302 304
      case VM_METHOD_TYPE_UNDEF:
305
	callback = FALSE;
303 306
	break;
304 307
      default:
305 308
	rb_bug("rb_add_method: unsupported method type (%d)\n", type);
306 309
    }
307
    method_added(klass, mid);
310
    if (callback) {
311
	method_added(klass, mid);
312
    }
308 313
    return me;
309 314
}
310 315