[macruby-changes] [2998] MacRuby/trunk/compiler.cpp

source_changes at macosforge.org source_changes at macosforge.org
Thu Nov 12 23:59:31 PST 2009


Revision: 2998
          http://trac.macosforge.org/projects/ruby/changeset/2998
Author:   lsansonetti at apple.com
Date:     2009-11-12 23:59:31 -0800 (Thu, 12 Nov 2009)
Log Message:
-----------
honor the current VM class when compiling outers

Modified Paths:
--------------
    MacRuby/trunk/compiler.cpp

Modified: MacRuby/trunk/compiler.cpp
===================================================================
--- MacRuby/trunk/compiler.cpp	2009-11-13 07:58:52 UTC (rev 2997)
+++ MacRuby/trunk/compiler.cpp	2009-11-13 07:59:31 UTC (rev 2998)
@@ -1263,7 +1263,9 @@
 RoxorCompiler::compile_current_class(void)
 {
     if (current_opened_class == NULL) {
-	return compile_nsobject();
+	VALUE current_class = (VALUE)GET_VM()->get_current_class();
+	return current_class == 0
+	    ? compile_nsobject() : compile_literal(current_class);
     }
     return new LoadInst(current_opened_class, "", bb);
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091112/bd584ab1/attachment.html>


More information about the macruby-changes mailing list