[macruby-changes] [2626] MacRuby/trunk/objc.m
source_changes at macosforge.org
source_changes at macosforge.org
Wed Sep 23 18:10:21 PDT 2009
Revision: 2626
http://trac.macosforge.org/projects/ruby/changeset/2626
Author: lsansonetti at apple.com
Date: 2009-09-23 18:10:20 -0700 (Wed, 23 Sep 2009)
Log Message:
-----------
fix for <rdar://problem/7210942> instance variables not visible from within iterator in method called through KVO
Modified Paths:
--------------
MacRuby/trunk/objc.m
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2009-09-24 00:56:58 UTC (rev 2625)
+++ MacRuby/trunk/objc.m 2009-09-24 01:10:20 UTC (rev 2626)
@@ -604,9 +604,15 @@
Class ret_orig;
name += 15;
ret_orig = objc_getClass(name);
- if (ret_orig != NULL && RCLASS_VERSION(ret_orig) & RCLASS_IS_OBJECT_SUBCLASS) {
- DLOG("XXX", "marking KVO generated klass %p (%s) as RObject", ret, class_getName(ret));
- ret_version |= RCLASS_IS_OBJECT_SUBCLASS;
+ if (ret_orig != NULL) {
+ const long orig_v = RCLASS_VERSION(ret_orig);
+ if ((orig_v & RCLASS_IS_OBJECT_SUBCLASS) == RCLASS_IS_OBJECT_SUBCLASS) {
+ ret_version |= RCLASS_IS_OBJECT_SUBCLASS;
+ }
+ if ((orig_v & RCLASS_IS_RUBY_CLASS) == RCLASS_IS_RUBY_CLASS) {
+ ret_version |= RCLASS_IS_RUBY_CLASS;
+ }
+ // XXX merge more flags?
}
}
ret_version |= KVO_CHECK_DONE;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090923/9113f179/attachment.html>
More information about the macruby-changes
mailing list