[macruby-changes] [2468] MacRuby/trunk/string.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Sep 3 22:31:17 PDT 2009
Revision: 2468
http://trac.macosforge.org/projects/ruby/changeset/2468
Author: lsansonetti at apple.com
Date: 2009-09-03 22:31:17 -0700 (Thu, 03 Sep 2009)
Log Message:
-----------
make sure ByteString#to_str returns self
Modified Paths:
--------------
MacRuby/trunk/string.c
Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c 2009-09-04 05:30:56 UTC (rev 2467)
+++ MacRuby/trunk/string.c 2009-09-04 05:31:17 UTC (rev 2468)
@@ -2507,7 +2507,7 @@
static VALUE
rb_str_to_s(VALUE str, SEL sel)
{
- if (!rb_objc_str_is_pure(str)) {
+ if (!rb_objc_str_is_pure(str) && *(VALUE *)str != rb_cByteString) {
VALUE dup = str_alloc(rb_cString);
rb_str_replace(dup, str);
return dup;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090903/9b985c4b/attachment.html>
More information about the macruby-changes
mailing list