char *ss = s;
int state = 0;
+ unsigned int i = 0;
unsigned int e = 0;
VALUE tuple;
- if (start <= stop)
- {
- s += start;
+ s += start;
- while (*s)
+ for (i = start; i <= stop; i++, s++)
+ {
+ if ((e = backtrack(ss, s, p, mis, ins, del, state)))
{
- if ((e = backtrack(ss, s, p, mis, ins, del, state)))
- {
- tuple = rb_ary_new();
- rb_ary_push(tuple, INT2FIX((int) (s - ss)));
- rb_ary_push(tuple, INT2FIX((int) e - (s - ss)));
- return tuple;
- }
-
- s++;
+ tuple = rb_ary_new();
+ rb_ary_push(tuple, INT2FIX((int) (s - ss)));
+ rb_ary_push(tuple, INT2FIX((int) e - (s - ss)));
+ return tuple;
}
}