Revision
3969
Author
martinlagardette@apple.com
Date
2010-04-28 19:42:04 -0700 (Wed, 28 Apr 2010)

Log Message

IRB should nor crash when receiving Obj-C exceptions

Modified Paths

Diff

Modified: MacRuby/trunk/lib/irb.rb (3968 => 3969)


--- MacRuby/trunk/lib/irb.rb	2010-04-28 05:42:04 UTC (rev 3968)
+++ MacRuby/trunk/lib/irb.rb	2010-04-29 02:42:04 UTC (rev 3969)
@@ -156,6 +156,7 @@
 	  end
 	  if exc
 	    print exc.class, ": ", exc, "\n"
+	    exc.set_backtrace([]) if exc.backtrace.nil?
 	    if exc.backtrace[0] =~ /irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/ &&
                 !(SyntaxError === exc)
 	      irb_bug = true