[macruby-changes] [4934] MacRuby/trunk/objc.h

source_changes at macosforge.org source_changes at macosforge.org
Mon Nov 22 18:19:35 PST 2010


Revision: 4934
          http://trac.macosforge.org/projects/ruby/changeset/4934
Author:   lsansonetti at apple.com
Date:     2010-11-22 18:19:33 -0800 (Mon, 22 Nov 2010)
Log Message:
-----------
fix a bug in rb_objc_install_method() where the previous IMP would not always be returned

Modified Paths:
--------------
    MacRuby/trunk/objc.h

Modified: MacRuby/trunk/objc.h
===================================================================
--- MacRuby/trunk/objc.h	2010-11-23 01:57:21 UTC (rev 4933)
+++ MacRuby/trunk/objc.h	2010-11-23 02:19:33 UTC (rev 4934)
@@ -52,7 +52,9 @@
 		sel_getName(sel), klass);
 	abort();
     }
-    return class_replaceMethod(klass, sel, imp, method_getTypeEncoding(method));
+    IMP old = method_getImplementation(method);
+    class_replaceMethod(klass, sel, imp, method_getTypeEncoding(method));
+    return old;
 }
 
 static inline IMP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101122/302c8310/attachment.html>


More information about the macruby-changes mailing list