--- MacRuby/trunk/string.c 2010-06-02 03:54:58 UTC (rev 4190)
+++ MacRuby/trunk/string.c 2010-06-02 04:14:57 UTC (rev 4191)
@@ -1771,6 +1771,7 @@
static VALUE
rstr_to_data(VALUE self, SEL sel)
{
+ str_make_data_binary(RSTR(self));
CFDataRef data = CFDataCreate(NULL, (const UInt8 *)RSTR(self)->data.bytes,
RSTR(self)->length_in_bytes);
CFMakeCollectable(data);