Skip to content

Commit 69e3c2e

Browse files
committed
Small reformat and rename
1 parent 36d4d03 commit 69e3c2e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/org/truffleruby/core/string/StringNodes.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3173,8 +3173,7 @@ protected Object stringAwkSplitAsciiOnly(Object string, int limit, Object block,
31733173
findingSubstringEnd = false;
31743174

31753175
final RubyString substring = createSubString(substringNode, tstring, encoding,
3176-
substringStart,
3177-
i - substringStart);
3176+
substringStart, i - substringStart);
31783177
ret = addSubstring(
31793178
ret,
31803179
storeIndex++,
@@ -3245,12 +3244,12 @@ protected Object stringAwkSplit(Object string, int limit, Object block,
32453244
var iterator = createCodePointIteratorNode.execute(tstring, tencoding, ErrorHandling.RETURN_NEGATIVE);
32463245

32473246
boolean skip = true;
3248-
int e = 0, b = 0, n = 0;
3247+
int e = 0, b = 0, iterations = 0;
32493248
try {
32503249
while (loopProfile.inject(iterator.hasNext())) {
32513250
int c = nextNode.execute(iterator);
32523251
int p = iterator.getByteIndex();
3253-
n++;
3252+
iterations++;
32543253

32553254
if (skip) {
32563255
if (StringSupport.isAsciiSpace(c)) {
@@ -3283,7 +3282,7 @@ protected Object stringAwkSplit(Object string, int limit, Object block,
32833282
}
32843283
}
32853284
} finally {
3286-
profileAndReportLoopCount(loopProfile, n);
3285+
profileAndReportLoopCount(loopProfile, iterations);
32873286
}
32883287

32893288
if (trailingSubstringProfile.profile(len > 0 && (limitPositive || len > b || limit < 0))) {

0 commit comments

Comments
 (0)