Skip to content

Commit 7661418

Browse files
committed
Minor renaming for raw array handling
1 parent 6432f0b commit 7661418

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

core/src/main/java/org/jruby/RubyArray.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,15 @@ public static final RubyArray newArrayLight(final Ruby runtime, final int len) {
202202
* @param len the length of the array buffer requested
203203
* @return an array with the given buffer size, entries initialized to null
204204
*/
205-
public static RubyArray newArrayRaw(final ThreadContext context, final int len) {
205+
public static RubyArray newRawArray(final ThreadContext context, final int len) {
206206
Ruby runtime = context.runtime;
207207
return new RubyArray(runtime, runtime.getArray(), IRubyObject.array(len), 0, 0, false);
208208
}
209209

210210
/**
211211
* Fill the remaining array slots with the given value. Pair with newArrayRaw to reduce the cost of setting up a new array.
212-
*
213212
*/
214-
public void fillRestWithNil(final ThreadContext context) {
213+
public void finishRawArray(final ThreadContext context) {
215214
int realLength = this.realLength;
216215
IRubyObject[] values = this.values;
217216
if (realLength == values.length) return;

core/src/main/java/org/jruby/RubyClass.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ public Collection<RubyClass> subclasses(boolean includeDescendants) {
10591059
}
10601060

10611061
private RubyArray<RubyClass> newConcreteSubclassesArray(ThreadContext context) {
1062-
RubyArray<RubyClass> subs = RubyArray.newArrayRaw(context, this.concreteSubclassesEstimate);
1062+
RubyArray<RubyClass> subs = RubyArray.newRawArray(context, this.concreteSubclassesEstimate);
10631063
return subs;
10641064
}
10651065

@@ -1133,7 +1133,7 @@ private static void processConcreteSubclass(RubyArray<RubyClass> subs, RubyClass
11331133
}
11341134

11351135
private void finishConcreteSubclasses(ThreadContext context, RubyArray<RubyClass> subs, int clearedCount) {
1136-
subs.fillRestWithNil(context);
1136+
subs.finishRawArray(context);
11371137
int newSize = subs.size();
11381138
concreteSubclassesEstimate = newSize;
11391139
cleanSubclasses(newSize, clearedCount);

0 commit comments

Comments
 (0)