[macruby-changes] [2995] MacRuby/trunk/class.c

source_changes at macosforge.org source_changes at macosforge.org
Wed Nov 11 03:27:19 PST 2009


Revision: 2995
          http://trac.macosforge.org/projects/ruby/changeset/2995
Author:   lsansonetti at apple.com
Date:     2009-11-11 03:27:18 -0800 (Wed, 11 Nov 2009)
Log Message:
-----------
<rdar://problem/7381872> Object#class returns singleton classes

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

Modified: MacRuby/trunk/class.c
===================================================================
--- MacRuby/trunk/class.c	2009-11-11 11:16:12 UTC (rev 2994)
+++ MacRuby/trunk/class.c	2009-11-11 11:27:18 UTC (rev 2995)
@@ -130,6 +130,9 @@
     rb_objc_define_private_method(klass, "initialize_copy",
 	    rb_obj_init_copy, 1);
 
+    // To make sure singleton classes will be filtered.
+    rb_objc_define_method(klass, "class", rb_obj_class, 0);
+
     rb_objc_install_method(*(Class *)klass, selAllocWithZone,
 	    (IMP)rb_obj_imp_allocWithZone);
     rb_objc_install_method((Class)klass, selIsEqual,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091111/cf086986/attachment.html>


More information about the macruby-changes mailing list