[macruby-changes] [5246] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 25 17:08:30 PST 2011
Revision: 5246
http://trac.macosforge.org/projects/ruby/changeset/5246
Author: lsansonetti at apple.com
Date: 2011-02-25 17:08:28 -0800 (Fri, 25 Feb 2011)
Log Message:
-----------
fix a bug where we would crash when protecting an internal call during an exception raise
Modified Paths:
--------------
MacRuby/trunk/error.c
MacRuby/trunk/eval.c
Modified: MacRuby/trunk/error.c
===================================================================
--- MacRuby/trunk/error.c 2011-02-25 22:24:32 UTC (rev 5245)
+++ MacRuby/trunk/error.c 2011-02-26 01:08:28 UTC (rev 5246)
@@ -828,7 +828,7 @@
desc = "false";
break;
default:
- d = rb_protect(safe_inspect, obj, 0);
+ d = rb_protect(safe_inspect, obj, NULL);
if (NIL_P(d) || RSTRING_LEN(d) > 65) {
d = rb_any_to_s(obj);
}
Modified: MacRuby/trunk/eval.c
===================================================================
--- MacRuby/trunk/eval.c 2011-02-25 22:24:32 UTC (rev 5245)
+++ MacRuby/trunk/eval.c 2011-02-26 01:08:28 UTC (rev 5246)
@@ -487,7 +487,10 @@
static VALUE
protect_rescue(VALUE obj, VALUE exc)
{
- *(int *)obj = 1;
+ int *state = (int *)obj;
+ if (state != NULL) {
+ *state = 1;
+ }
GC_RETAIN(exc);
protect_exc = exc;
return Qnil;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110225/bf764b4a/attachment.html>
More information about the macruby-changes
mailing list