[macruby-changes] [592] MacRuby/branches/testing

source_changes at macosforge.org source_changes at macosforge.org
Mon Sep 8 22:41:46 PDT 2008


Revision: 592
          http://trac.macosforge.org/projects/ruby/changeset/592
Author:   lsansonetti at apple.com
Date:     2008-09-08 22:41:45 -0700 (Mon, 08 Sep 2008)
Log Message:
-----------
backporting more fixes from trunk

Modified Paths:
--------------
    MacRuby/branches/testing/Rakefile
    MacRuby/branches/testing/string.c

Modified: MacRuby/branches/testing/Rakefile
===================================================================
--- 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
===================================================================
--- 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);
 	}
     }
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080908/ea98f243/attachment.html 


More information about the macruby-changes mailing list