Skip to content

Commit

Permalink
Fix broken test in precompiled run testing passing 3 args to no-arg m…
Browse files Browse the repository at this point in the history
…ethod and expecting ArgumentError.

git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@7226 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information
headius committed Jul 19, 2008
1 parent 99ec873 commit 7e99595
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -224,11 +224,7 @@ public DynamicMethod getCompiledMethod(
// check arity // check arity
mv.aload(1); mv.aload(1);
mv.invokevirtual(p(ThreadContext.class), "getRuntime", sig(Ruby.class)); mv.invokevirtual(p(ThreadContext.class), "getRuntime", sig(Ruby.class));
if (scope.getRequiredArgs() == 0) { mv.aload(5);
mv.getstatic(p(IRubyObject.class), "NULL_ARRAY", ci(IRubyObject[].class));
} else {
mv.aload(5);
}
mv.pushInt(scope.getRequiredArgs()); mv.pushInt(scope.getRequiredArgs());
mv.pushInt(scope.getRequiredArgs()); mv.pushInt(scope.getRequiredArgs());
mv.invokestatic(p(Arity.class), "checkArgumentCount", sig(int.class, Ruby.class, IRubyObject[].class, int.class, int.class)); mv.invokestatic(p(Arity.class), "checkArgumentCount", sig(int.class, Ruby.class, IRubyObject[].class, int.class, int.class));
Expand Down

0 comments on commit 7e99595

Please sign in to comment.