[macruby-changes] [2628] MacRuby/trunk/string.c

source_changes at macosforge.org source_changes at macosforge.org
Thu Sep 24 14:04:55 PDT 2009


Revision: 2628
          http://trac.macosforge.org/projects/ruby/changeset/2628
Author:   lsansonetti at apple.com
Date:     2009-09-24 14:04:52 -0700 (Thu, 24 Sep 2009)
Log Message:
-----------
fix for <rdar://problem/7251261> Infinite recursion trying to convert an NSPathStore2 to a string

Modified Paths:
--------------
    MacRuby/trunk/string.c

Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c	2009-09-24 20:28:30 UTC (rev 2627)
+++ MacRuby/trunk/string.c	2009-09-24 21:04:52 UTC (rev 2628)
@@ -2508,7 +2508,10 @@
 {
     if (!rb_objc_str_is_pure(str) && *(VALUE *)str != rb_cByteString) {
 	VALUE dup = str_alloc(rb_cString);
-	rb_str_replace(dup, str);
+	CFStringReplaceAll((CFMutableStringRef)dup, (CFStringRef)str);
+	if (OBJ_TAINTED(str)) {
+	    OBJ_TAINT(dup);
+	}
 	return dup;
     }
     return str;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090924/9f5c612b/attachment.html>


More information about the macruby-changes mailing list