#612: RegexpError: too short escaped multibyte character
---------------------------------+------------------------------------------
Reporter: cehoff...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
---------------------------------+------------------------------------------
Comment(by cehoff...@…):
These changes are specifically the ones that bring up the RegexpError.
{{{
diff --git a/array.c b/array.c
index c4f7e7f..7cf2d4a 100644
--- a/array.c
+++ b/array.c
@@ -2887,11 +2887,12 @@ rary_sample(VALUE ary, SEL sel, int argc, VALUE
*argv)
memmove(&sorted[j+1], &sorted[j], sizeof(sorted[0])*(i-j));
sorted[j] = idx[i] = k;
}
- VALUE *elems = (VALUE *)alloca(sizeof(VALUE) * n);
+ VALUE *elems = (VALUE *)malloc(sizeof(VALUE) * n);
for (i = 0; i < n; i++) {
elems[i] = RARRAY_AT(ary, idx[i]);
}
result = rb_ary_new4(n, elems);
+ free(elems);
}
else {
VALUE *elems = (VALUE *)malloc(sizeof(VALUE) * n);
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/612#comment:1>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel