Modified: MacRuby/branches/icu/string.c (3736 => 3737)
--- MacRuby/branches/icu/string.c 2010-03-11 22:00:38 UTC (rev 3736)
+++ MacRuby/branches/icu/string.c 2010-03-11 22:01:01 UTC (rev 3737)
@@ -2655,6 +2655,8 @@
else {
rb_ary_push(ary, scan_result);
}
+
+ rb_backref_set(match);
}
return block_given ? self : ary;
@@ -4238,7 +4240,8 @@
"cannot make receiver data as Unicode characters");
}
- UChar *chars_buf = (UChar *)malloc(RSTR(str)->length_in_bytes);
+ UChar *chars_buf = (UChar *)malloc(RSTR(str)->length_in_bytes
+ + sizeof(UChar));
UChar *chars_ptr = &chars_buf[1];
memcpy(chars_ptr, RSTR(str)->data.uchars, RSTR(str)->length_in_bytes);