--- MacRuby/branches/icu/string.c 2010-03-09 23:04:10 UTC (rev 3717)
+++ MacRuby/branches/icu/string.c 2010-03-10 00:43:25 UTC (rev 3718)
@@ -1055,6 +1055,10 @@
str_must_have_compatible_encoding(self, searched);
str_make_same_format(self, searched);
+ if (searched->length_in_bytes == 0 && self->length_in_bytes == 0) {
+ return start_index;
+ }
+
long start_offset_in_bytes;
if (start_index == 0) {
start_offset_in_bytes = 0;