[macruby-changes] [2421] MacRuby/trunk/objc.m
source_changes at macosforge.org
source_changes at macosforge.org
Fri Aug 28 18:51:44 PDT 2009
Revision: 2421
http://trac.macosforge.org/projects/ruby/changeset/2421
Author: lsansonetti at apple.com
Date: 2009-08-28 18:51:44 -0700 (Fri, 28 Aug 2009)
Log Message:
-----------
fixed a bug in the post-framework class reload by not loading pure ruby classes
Modified Paths:
--------------
MacRuby/trunk/objc.m
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2009-08-29 00:31:50 UTC (rev 2420)
+++ MacRuby/trunk/objc.m 2009-08-29 01:51:44 UTC (rev 2421)
@@ -251,18 +251,22 @@
Class *buf;
count = objc_getClassList(NULL, 0);
- if (count == class_count)
+ if (count == class_count) {
return;
+ }
buf = (Class *)alloca(sizeof(Class) * count);
objc_getClassList(buf, count);
for (i = 0; i < count; i++) {
- const char *name = class_getName(buf[i]);
- if (name[0] != '_') {
- ID name_id = rb_intern(name);
- if (!rb_const_defined(rb_cObject, name_id)) {
- rb_const_set(rb_cObject, name_id, (VALUE)buf[i]);
+ Class k = buf[i];
+ if (!RCLASS_RUBY(k)) {
+ const char *name = class_getName(k);
+ if (name[0] != '_') {
+ ID name_id = rb_intern(name);
+ if (!rb_const_defined(rb_cObject, name_id)) {
+ rb_const_set(rb_cObject, name_id, (VALUE)k);
+ }
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090828/3bb3ec6a/attachment.html>
More information about the macruby-changes
mailing list