Skip to content

Commit d7ccbed

Browse files
committed
Slight change to logic for reloading post arguments.
1 parent 900aad5 commit d7ccbed

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/org/truffleruby/parser/ReloadArgumentsTranslator.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@ public RubyNode visitArgsNode(ArgsParseNode node) {
8989
int postCount = node.getPostCount();
9090

9191
if (postCount > 0) {
92-
index = -1;
93-
92+
index = -postCount;
9493
int postIndex = node.getPostIndex();
95-
for (int i = postCount - 1; i >= 0; i--) {
94+
for (int i = 0; i < postCount; i++) {
9695
sequence.add(args[postIndex + i].accept(this));
97-
index--;
96+
index++;
9897
}
9998
}
10099

0 commit comments

Comments
 (0)