[macruby-changes] [759] MacRuby/trunk/vm_insnhelper.c

source_changes at macosforge.org source_changes at macosforge.org
Fri Nov 28 21:18:34 PST 2008


Revision: 759
          http://trac.macosforge.org/projects/ruby/changeset/759
Author:   lsansonetti at apple.com
Date:     2008-11-28 21:18:34 -0800 (Fri, 28 Nov 2008)
Log Message:
-----------
cleanup some code

Modified Paths:
--------------
    MacRuby/trunk/vm_insnhelper.c

Modified: MacRuby/trunk/vm_insnhelper.c
===================================================================
--- MacRuby/trunk/vm_insnhelper.c	2008-11-27 03:02:43 UTC (rev 758)
+++ MacRuby/trunk/vm_insnhelper.c	2008-11-29 05:18:34 UTC (rev 759)
@@ -882,14 +882,12 @@
 			if (method != NULL
 			    && (imp = method_getImplementation(method)) != NULL
 			    && rb_objc_method_node3(imp) == NULL) {
-#if 0
-			    /* XXX this breaks KVO setters since the original implementation
-			     * assumes that _cmd is the original method name.
+			    /* We are caching the original implementation here 
+			     * but we do not create any convenience method on
+			     * the class based on the 'new' selector, because
+			     * this breaks the automatic KVO setters which 
+			     * expect _cmd to remain the original selector.
 			     */
-			    assert(class_addMethod((Class)klass, 
-					mcache->as.rcall.sel, imp,
-					method_getTypeEncoding(method)));
-#endif
 			    mcache->flags = RB_MCACHE_OCALL_FLAG;
 			    mcache->as.rcall.sel = sel;
 			    mcache->as.ocall.klass = klass;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081128/74b6ee3c/attachment.html>


More information about the macruby-changes mailing list