Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -242,7 +242,8 @@ public RubyString getIndex(RubyString string, int start, int length) {
// TODO(CS): why does subSequence return CharSequence?
final int begin = string.normaliseIndex(start);
final int exclusiveEnd = string.normaliseIndex(begin + length);
return new RubyString(getContext().getCoreLibrary().getStringClass(), (ByteList) string.getBytes().subSequence(begin, exclusiveEnd - begin));

return new RubyString(getContext().getCoreLibrary().getStringClass(), (ByteList) string.getBytes().subSequence(begin, exclusiveEnd));
}

}

0 comments on commit 3c3edd5

Please sign in to comment.