Revision
3396
Author
pthomson@apple.com
Date
2010-02-01 08:00:07 -0800 (Mon, 01 Feb 2010)

Log Message

Fixed an infinite loop in Object#freeze that only occurs at SAFE level 4.

Modified Paths

Diff

Modified: MacRuby/trunk/object.c (3395 => 3396)


--- MacRuby/trunk/object.c	2010-02-01 09:59:05 UTC (rev 3395)
+++ MacRuby/trunk/object.c	2010-02-01 16:00:07 UTC (rev 3396)
@@ -1106,7 +1106,7 @@
 {
     if (!OBJ_FROZEN(obj)) {
 	int type;
-	if (rb_safe_level() >= 4 && !OBJ_TAINTED(obj)) {
+	if (rb_safe_level() >= 4 && OBJ_UNTRUSTED(obj)) {
 	    rb_raise(rb_eSecurityError, "Insecure: can't freeze object");
 	}
 	else if (SPECIAL_CONST_P(obj)) {