boolean lastNull = false;
RubyArray result = runtime.newArray();
final Encoding enc = regex.getEncoding();
if (regex.numberOfCaptures() == 0) { // shorter path, no captures defined, no region will be returned
while ((end = matcher.search(start, range, Option.NONE)) >= 0) {
if (start == end + begin && matcher.getBegin() == matcher.getEnd()) {
if (value.realSize == 0) {
result.append(newEmptyString(runtime, getMetaClass()));
break;
} else if (lastNull) {