Revision
592
Author
lsansonetti@apple.com
Date
2008-09-08 22:41:45 -0700 (Mon, 08 Sep 2008)

Log Message

backporting more fixes from trunk

Modified Paths

Diff

Modified: MacRuby/branches/testing/Rakefile (591 => 592)


--- MacRuby/branches/testing/Rakefile	2008-09-09 05:33:38 UTC (rev 591)
+++ MacRuby/branches/testing/Rakefile	2008-09-09 05:41:45 UTC (rev 592)
@@ -608,7 +608,7 @@
 task :install => 'framework:install'
 
 desc "Generate and install RDoc/RI"
-task :install_doc => 'miniruby' do
+task :install_doc do
   doc_op = '.ext/rdoc'
   unless File.exist?(doc_op)
     sh "./miniruby -I./lib bin/rdoc --all --ri --op \"#{doc_op}\""

Modified: MacRuby/branches/testing/string.c (591 => 592)


--- MacRuby/branches/testing/string.c	2008-09-09 05:33:38 UTC (rev 591)
+++ MacRuby/branches/testing/string.c	2008-09-09 05:41:45 UTC (rev 592)
@@ -127,9 +127,11 @@
 		kCFAllocatorNull);
 	rb_gc_malloc_increase(datalen);
 	if (bytestr != NULL) {
-	    CFStringReplaceAll((CFMutableStringRef)str, (CFStringRef)bytestr);
+	    if (CFStringGetLength(bytestr) == datalen) {
+		CFStringReplaceAll((CFMutableStringRef)str, (CFStringRef)bytestr);
+		rb_str_cfdata_set(str, NULL);
+	    }
 	    CFRelease(bytestr);
-	    rb_str_cfdata_set(str, NULL);
 	}
     }
 }