[macruby-changes] [3463] MacRuby/trunk/class.c
source_changes at macosforge.org
source_changes at macosforge.org
Tue Feb 9 14:46:05 PST 2010
Revision: 3463
http://trac.macosforge.org/projects/ruby/changeset/3463
Author: lsansonetti at 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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100209/3c824787/attachment.html>
More information about the macruby-changes
mailing list