--- 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