Skip to content

Commit e70cf66

Browse files
authored
Merge pull request #4561 from etehtsea/fix-method-params
Fix Method#parameters for a method generated by respond_to_missing?
2 parents ee57db8 + 87c140d commit e70cf66

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,7 @@ public static class RespondToMissingMethod extends JavaMethod.JavaMethodNBlock {
18471847
public RespondToMissingMethod(RubyModule implClass, Visibility vis, String methodName) {
18481848
super(implClass, vis);
18491849

1850+
setParameterList(REST);
18501851
site = new FunctionalCachingCallSite(methodName);
18511852
}
18521853
@Override

core/src/main/java/org/jruby/internal/runtime/methods/JavaMethod.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public abstract class JavaMethod extends DynamicMethod implements Cloneable, Met
5353
private static final String[] ONE_REQ = new String[] { "q" };
5454
private static final String[] TWO_REQ = new String[] { "q", "q" };
5555
private static final String[] THREE_REQ = new String[] { "q", "q", "q" };
56+
protected static final String[] REST = new String[] { "r" };
5657

5758
public static final Class[][] METHODS = {
5859
{JavaMethodZero.class, JavaMethodZeroOrOne.class, JavaMethodZeroOrOneOrTwo.class, JavaMethodZeroOrOneOrTwoOrThree.class},

spec/tags/ruby/core/method/parameters_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)