[macruby-changes] [301] MacRuby/trunk/objc.m
source_changes at macosforge.org
source_changes at macosforge.org
Sun Jun 22 01:11:29 PDT 2008
Revision: 301
http://trac.macosforge.org/projects/ruby/changeset/301
Author: lsansonetti at apple.com
Date: 2008-06-22 01:11:29 -0700 (Sun, 22 Jun 2008)
Log Message:
-----------
fix for #82
Modified Paths:
--------------
MacRuby/trunk/objc.m
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2008-06-22 08:01:30 UTC (rev 300)
+++ MacRuby/trunk/objc.m 2008-06-22 08:11:29 UTC (rev 301)
@@ -2524,6 +2524,13 @@
return rb_objc_allocate(rcv);
}
+static void *
+imp_rb_obj_init(void *rcv, SEL sel)
+{
+ rb_funcall((VALUE)rcv, idInitialize, 0);
+ return rcv;
+}
+
static void
rb_install_alloc_methods(void)
{
@@ -2532,6 +2539,8 @@
rb_objc_install_method(klass, @selector(alloc), (IMP)imp_rb_obj_alloc);
rb_objc_install_method(klass, @selector(allocWithZone:),
(IMP)imp_rb_obj_allocWithZone);
+ rb_objc_install_method(RCLASS_OCID(rb_cObject), @selector(init),
+ (IMP)imp_rb_obj_init);
}
ID
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080622/09a11c4c/attachment.htm
More information about the macruby-changes
mailing list