Skip to content

Commit 87ac2a1

Browse files
andrykonchineregon
authored andcommitted
Refactor ArrayNodes.java a bit and renamed argument to more specific enumerator
1 parent 0f0f78b commit 87ac2a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/truffleruby/core/array/ArrayNodes.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,11 @@ protected Object indexRange(RubyArray array, Object range, NotProvided length,
285285
return readSliceNode.executeReadSlice(array, startLength[0], len);
286286
}
287287

288-
@Specialization(guards = "isArithmeticSequence(index, isANode)", limit = "1")
289-
protected Object indexArithmeticSequence(RubyArray array, Object index, NotProvided length,
288+
@Specialization(guards = "isArithmeticSequence(enumerator, isANode)", limit = "1")
289+
protected Object indexArithmeticSequence(RubyArray array, Object enumerator, NotProvided length,
290290
@Cached @Shared IsANode isANode,
291291
@Cached DispatchNode callSliceArithmeticSequence) {
292-
return callSliceArithmeticSequence.call(array, "slice_arithmetic_sequence", index);
292+
return callSliceArithmeticSequence.call(array, "slice_arithmetic_sequence", enumerator);
293293
}
294294

295295
@Specialization(

0 commit comments

Comments
 (0)