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

source_changes at macosforge.org source_changes at macosforge.org
Tue Aug 10 18:54:59 PDT 2010


Revision: 4420
          http://trac.macosforge.org/projects/ruby/changeset/4420
Author:   lsansonetti at apple.com
Date:     2010-08-10 18:54:56 -0700 (Tue, 10 Aug 2010)
Log Message:
-----------
fix bad assertion (thanks to vincent)

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

Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c	2010-08-11 00:55:41 UTC (rev 4419)
+++ MacRuby/trunk/string.c	2010-08-11 01:54:56 UTC (rev 4420)
@@ -717,7 +717,7 @@
 static void
 str_ensure_null_terminator(rb_str_t *self)
 {
-    assert(!str_is_stored_in_uchars(self));
+    assert(!str_is_stored_in_uchars(self) || NATIVE_UTF16_ENC(self->encoding));
 
     if (self->length_in_bytes > 0
 	&& (self->capacity_in_bytes == self->length_in_bytes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100810/eeb6fbb7/attachment-0001.html>


More information about the macruby-changes mailing list