[macruby-changes] [4169] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu May 27 00:26:43 PDT 2010


Revision: 4169
          http://trac.macosforge.org/projects/ruby/changeset/4169
Author:   martinlagardette at apple.com
Date:     2010-05-27 00:26:37 -0700 (Thu, 27 May 2010)
Log Message:
-----------
Revert r4165 and fix the issue within MacRuby instead.

Revision Links:
--------------
    http://trac.macosforge.org/projects/ruby/changeset/4165

Modified Paths:
--------------
    MacRuby/trunk/lib/irb/formatter.rb
    MacRuby/trunk/objc.m

Modified: MacRuby/trunk/lib/irb/formatter.rb
===================================================================
--- MacRuby/trunk/lib/irb/formatter.rb	2010-05-26 23:38:25 UTC (rev 4168)
+++ MacRuby/trunk/lib/irb/formatter.rb	2010-05-27 07:26:37 UTC (rev 4169)
@@ -47,7 +47,6 @@
     end
     
     def exception(exception)
-      exception.set_backtrace([]) if exception.backtrace.nil? 
       backtrace = $DEBUG ? exception.backtrace : filter_backtrace(exception.backtrace)
       "#{exception.class.name}: #{exception.message}\n\t#{backtrace.join("\n\t")}"
     end

Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m	2010-05-26 23:38:25 UTC (rev 4168)
+++ MacRuby/trunk/objc.m	2010-05-27 07:26:37 UTC (rev 4169)
@@ -638,7 +638,10 @@
     char buf[1000];
     snprintf(buf, sizeof buf, "%s: %s", [[exc name] UTF8String],
 	    [[exc reason] UTF8String]);
-    return rb_exc_new2(rb_eRuntimeError, buf);
+    VALUE e = rb_exc_new2(rb_eRuntimeError, buf);
+    // Set an empty backtrace for Obj-C exceptions (instead of nil)
+    rb_iv_set(e, "bt", rb_ary_new());
+    return e;
 }
 
 void
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100527/2cc5ba24/attachment-0001.html>


More information about the macruby-changes mailing list