Skip to content

Commit 31a9cf7

Browse files
author
Nicolas Laurent
committed
rename isNilNil to isBoundless
1 parent ea1542e commit 31a9cf7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/org/truffleruby/core/range/RangeNodes.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ protected Object boundedToA(RubyObjectRange range) {
360360
return toAInternalCall.call(range, "to_a_internal");
361361
}
362362

363-
@Specialization(guards = "range.isEndless() || range.isNilNil()")
363+
@Specialization(guards = "range.isEndless() || range.isBoundless()")
364364
protected Object endlessToA(RubyObjectRange range) {
365365
throw new RaiseException(getContext(), coreExceptions().rangeError(
366366
"cannot convert endless range to an array",
@@ -434,7 +434,7 @@ protected RubyIntRange beginlessObjectRange(RubyObjectRange range, RubyArray arr
434434
end);
435435
}
436436

437-
@Specialization(guards = "range.isNilNil()")
437+
@Specialization(guards = "range.isBoundless()")
438438
protected RubyIntRange nilNilObjectRange(RubyObjectRange range, RubyArray array) {
439439
int begin = 0;
440440
int end = array.size;
@@ -615,7 +615,7 @@ protected int[] normalizeBeginlessRange(RubyObjectRange range, int size,
615615
return normalize(0, toInt.execute(range.end), range.excludedEnd, size);
616616
}
617617

618-
@Specialization(guards = "range.isNilNil()")
618+
@Specialization(guards = "range.isBoundless()")
619619
protected int[] normalizeNilNilRange(RubyObjectRange range, int size,
620620
@Cached ToIntNode toInt) {
621621
return new int[]{ 0, size };

src/main/java/org/truffleruby/core/range/RubyObjectRange.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public RubyObjectRange(RubyClass rubyClass, Shape shape, boolean excludedEnd, Ob
2929
this.end = end;
3030
}
3131

32-
public boolean isNilNil() {
32+
public boolean isBoundless() {
3333
return begin == Nil.INSTANCE && end == Nil.INSTANCE;
3434
}
3535

0 commit comments

Comments
 (0)