Revision: 3463 http://trac.macosforge.org/projects/ruby/changeset/3463 Author: lsansonetti@apple.com Date: 2010-02-09 14:46:04 -0800 (Tue, 09 Feb 2010) Log Message: ----------- BasicObject#initialize: do not forward -init in case it's a ruby method Modified Paths: -------------- MacRuby/trunk/class.c Modified: MacRuby/trunk/class.c =================================================================== --- MacRuby/trunk/class.c 2010-02-09 22:42:43 UTC (rev 3462) +++ MacRuby/trunk/class.c 2010-02-09 22:46:04 UTC (rev 3463) @@ -110,8 +110,10 @@ static VALUE rb_objc_init(VALUE rcv, SEL sel) { - IMP imp = class_getMethodImplementation((Class)CLASS_OF(rcv), selInit); - if (imp != NULL && imp != (IMP)rb_obj_imp_init) { + IMP imp = NULL; + rb_vm_method_node_t *node = NULL; + if (rb_vm_lookup_method((Class)CLASS_OF(rcv), sel, &imp, &node) + && imp != NULL && node == NULL && imp != (IMP)rb_obj_imp_init) { return (VALUE)((void *(*)(void *, SEL))*imp)((void *)rcv, selInit); } return rcv;
participants (1)
-
source_changes@macosforge.org