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

source_changes at macosforge.org source_changes at macosforge.org
Thu Jan 7 20:45:24 PST 2010


Revision: 3207
          http://trac.macosforge.org/projects/ruby/changeset/3207
Author:   lsansonetti at apple.com
Date:     2010-01-07 20:45:21 -0800 (Thu, 07 Jan 2010)
Log Message:
-----------
fixed a bug in String#dump in case the receiver is a bytestring

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

Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c	2010-01-08 03:58:41 UTC (rev 3206)
+++ MacRuby/trunk/string.c	2010-01-08 04:45:21 UTC (rev 3207)
@@ -2653,7 +2653,9 @@
 rb_str_dump(VALUE str, SEL sel)
 {
     VALUE res = __rb_str_inspect(str, true);
-    *(VALUE *)res = *(VALUE *)str;
+    if (*(VALUE *)str != rb_cByteString) {
+	*(VALUE *)res = *(VALUE *)str;
+    }
     return res;
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100107/51e61e18/attachment.html>


More information about the macruby-changes mailing list