Modified: MacRuby/trunk/string.c (2852 => 2853)
--- MacRuby/trunk/string.c 2009-10-19 22:52:16 UTC (rev 2852)
+++ MacRuby/trunk/string.c 2009-10-19 23:06:34 UTC (rev 2853)
@@ -326,17 +326,16 @@
{
VALUE dup;
-#if 1
if (*(VALUE *)str == rb_cByteString) {
dup = rb_bytestring_copy(str);
}
else {
dup = (VALUE)CFStringCreateMutableCopy(NULL, 0, (CFStringRef)str);
CFMakeCollectable((CFTypeRef)dup);
+ if (*(VALUE *)str != rb_cSymbol) {
+ *(VALUE *)dup = *(VALUE *)str;
+ }
}
-#else
- dup = (VALUE)objc_msgSend((id)str, selMutableCopy);
-#endif
if (OBJ_TAINTED(str)) {
OBJ_TAINT(dup);