last = last >= 0 ? last : length + last;
int newLength = last - first;
if (range.exclude_end_p().isFalse()) newLength += 1;
if (newLength <= 0) {
return arrayClass.emptyJavaArray(context);
}
return arrayClass.javaArraySubarray(context, getJavaArray(), first, newLength);
} else {
throw context.getRuntime().newTypeError("only Fixnum ranges supported");