[macruby-changes] [1153] MacRuby/branches/experimental/roxor.cpp

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 25 18:18:59 PDT 2009


Revision: 1153
          http://trac.macosforge.org/projects/ruby/changeset/1153
Author:   lsansonetti at apple.com
Date:     2009-03-25 18:18:56 -0700 (Wed, 25 Mar 2009)
Log Message:
-----------
let's be friendler and allow people calling rb_vm_run_under() without self

Modified Paths:
--------------
    MacRuby/branches/experimental/roxor.cpp

Modified: MacRuby/branches/experimental/roxor.cpp
===================================================================
--- MacRuby/branches/experimental/roxor.cpp	2009-03-26 00:55:06 UTC (rev 1152)
+++ MacRuby/branches/experimental/roxor.cpp	2009-03-26 01:18:56 UTC (rev 1153)
@@ -5917,10 +5917,11 @@
 rb_vm_run_under(VALUE klass, VALUE self, const char *fname, NODE *node)
 {
     assert(klass != 0);
-    assert(self != 0);
 
     VALUE old_top_object = GET_VM()->current_top_object;
-    GET_VM()->current_top_object = self;
+    if (self != 0) {
+	GET_VM()->current_top_object = self;
+    }
     Class old_class = GET_VM()->current_class;
     GET_VM()->current_class = (Class)klass;
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090325/3ce25f75/attachment.html>


More information about the macruby-changes mailing list