Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -658,10 +658,9 @@ public Object index(RubyArray array, int index, UndefinedPlaceholder undefined)

@Specialization(guards = "isIntegerFixnum")
public Object sliceIntegerFixnum(RubyArray array, int start, int length) {
notDesignedForCompilation();

final int normalisedIndex = array.normaliseIndex(start);

// TODO (nirvdrum 12-Jan-15) Add branch profiling.
if (normalisedIndex < 0 || normalisedIndex > array.getSize() || length < 0) {
return getContext().getCoreLibrary().getNilObject();
} else if (normalisedIndex == array.getSize()) {

0 comments on commit 1ca816f

Please sign in to comment.