Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix JRUBY-5954: Incorrect Method#parameters in 1.9 mode

* ProcMethod now implements MethodArgs2, providing proper access to define_method's args.
  • Loading branch information...
commit 7c38f9452d16a9213ec0de94b0f63308e3906698 1 parent a20c652
@headius headius authored
View
1  src/org/jruby/RubyJRuby.java
@@ -70,6 +70,7 @@
import org.jruby.ast.MultipleAsgn19Node;
import org.jruby.ast.UnnamedRestArgNode;
import org.jruby.internal.runtime.methods.MethodArgs2;
+import org.jruby.internal.runtime.methods.ProcMethod;
import org.jruby.java.proxies.JavaProxy;
import org.jruby.javasupport.util.RuntimeHelpers;
import org.jruby.runtime.ExecutionContext;
View
7 src/org/jruby/internal/runtime/methods/ProcMethod.java
@@ -32,6 +32,7 @@
import org.jruby.RubyModule;
import org.jruby.RubyProc;
+import org.jruby.ast.ArgsNode;
import org.jruby.runtime.Arity;
import org.jruby.runtime.Block;
import org.jruby.runtime.PositionAware;
@@ -43,7 +44,7 @@
*
* @author jpetersen
*/
-public class ProcMethod extends DynamicMethod implements PositionAware {
+public class ProcMethod extends DynamicMethod implements PositionAware, MethodArgs2 {
private RubyProc proc;
/**
@@ -86,4 +87,8 @@ public String getFile() {
public int getLine() {
return proc.getBlock().getBody().getLine();
}
+
+ public String[] getParameterList() {
+ return proc.getBlock().getBody().getParameterList();
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.