[MacRuby-devel] [MacRuby] #612: RegexpError: too short escaped multibyte character

MacRuby ruby-noreply at macosforge.org
Tue Feb 9 10:52:38 PST 2010


#612: RegexpError: too short escaped multibyte character
---------------------------------+------------------------------------------
 Reporter:  cehoffman@…          |       Owner:  lsansonetti@…        
     Type:  defect               |      Status:  new                  
 Priority:  blocker              |   Milestone:                       
Component:  MacRuby              |    Keywords:                       
---------------------------------+------------------------------------------

Comment(by cehoffman@…):

 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/>



More information about the MacRuby-devel mailing list