Skip to content

Commit b049fe0

Browse files
committed
Repair Method#parameters and return [:rest] without name for methods implemented with #method_missing
1 parent ae69a95 commit b049fe0

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/main/java/org/truffleruby/language/methods/SharedMethodInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public SharedMethodInfo convertMethodMissingToMethod(RubyModule declaringModule,
9191
blockDepth,
9292
moduleAndMethodName(declaringModule, methodName),
9393
notes,
94-
ArgumentDescriptor.ANY);
94+
ArgumentDescriptor.ANY_UNNAMED);
9595
}
9696

9797
public SourceSection getSourceSection() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public final class ArgumentDescriptor {
3636
/** The name of the argument */
3737
public final String name;
3838

39-
public static final ArgumentDescriptor[] ANY = { new ArgumentDescriptor(ArgumentType.anonrest) };
39+
public static final ArgumentDescriptor[] ANY_UNNAMED = { new ArgumentDescriptor(ArgumentType.unnamedrest) };
4040
public static final ArgumentDescriptor[] AT_LEAST_ONE = {
4141
new ArgumentDescriptor(ArgumentType.anonreq),
4242
new ArgumentDescriptor(ArgumentType.anonrest) };

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public enum ArgumentType {
4040
anonrest("rest", true),
4141
anonkeyrest("keyrest", true),
4242
anonblock("block", true),
43+
unnamedrest("rest", true),
4344
nokey("nokey", true); // **nil
4445

4546
ArgumentType(String symbolicName, boolean anonymous) {

0 commit comments

Comments
 (0)