[macruby-changes] [1319] MacRuby/branches/experimental/variable.c

source_changes at macosforge.org source_changes at macosforge.org
Fri Apr 3 19:25:08 PDT 2009


Revision: 1319
          http://trac.macosforge.org/projects/ruby/changeset/1319
Author:   lsansonetti at apple.com
Date:     2009-04-03 19:25:07 -0700 (Fri, 03 Apr 2009)
Log Message:
-----------
fixed #class_variables

Modified Paths:
--------------
    MacRuby/branches/experimental/variable.c

Modified: MacRuby/branches/experimental/variable.c
===================================================================
--- MacRuby/branches/experimental/variable.c	2009-04-04 02:09:42 UTC (rev 1318)
+++ MacRuby/branches/experimental/variable.c	2009-04-04 02:25:07 UTC (rev 1319)
@@ -2040,8 +2040,10 @@
 VALUE
 rb_mod_class_variables(VALUE obj, SEL sel)
 {
+    if (!RCLASS_META(obj)) {
+	obj = *(VALUE *)obj;
+    }
     VALUE ary = rb_ary_new();
-
     CFMutableDictionaryRef iv_dict = rb_class_ivar_dict(obj);
     if (iv_dict != NULL) {
 	ivar_dict_foreach((VALUE)iv_dict, cv_i, (VALUE)ary);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090403/69ec61c5/attachment.html>


More information about the macruby-changes mailing list