Modified: MacRuby/branches/icu/string.c (3634 => 3635)
--- MacRuby/branches/icu/string.c 2010-02-26 23:39:57 UTC (rev 3634)
+++ MacRuby/branches/icu/string.c 2010-02-26 23:44:04 UTC (rev 3635)
@@ -3670,6 +3670,10 @@
// This function can be called with a NULL encoding.
enc = rb_encodings[ENCODING_UTF8];
}
+ else {
+ // People must use the bstr_ APIs to deal with binary.
+ assert(enc != rb_encodings[ENCODING_BINARY]);
+ }
rb_str_t *str = str_alloc(rb_cRubyString);
str_replace_with_bytes(str, cstr, len, enc);
return (VALUE)str;