Multiply-binding JRubyMethod's with arity (min:0, max:2) can't have block args
------------------------------------------------------------------------------

                 Key: JRUBY-2530
                 URL: http://jira.codehaus.org/browse/JRUBY-2530
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
         Environment: Latest JRuby 1.1.1 +
            Reporter: Vladimir Sizikov
            Assignee: Vladimir Sizikov
             Fix For: JRuby 1.1.2


If such methods have the block args, then an attempt to invoke a method without 
a block would lead to exception.

For example:

(in RubyKernel, prior to revision 6712):
public static IRubyObject chomp(ThreadContext context, IRubyObject recv, Block 
block) 
public static IRubyObject chomp(ThreadContext context, IRubyObject recv, 
IRubyObject arg0, Block block) 
public static IRubyObject chomp(ThreadContext context, IRubyObject recv, 
IRubyObject arg0, IRubyObject arg1, Block block) 

These are 3 methods all binding to "chomp", but with different arity.
Any attempt to invoke chomp method without a block would lead to something like 
this:

{noformat}
c:\java\jruby-1.1.1\bin>jruby -e chomp
Exception in thread "main" java.lang.AbstractMethodError: 
org.jruby.internal.runtime.methods.DynamicMethod.call(Lor
g/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyModule;Ljava/lang/String;)Lorg/
jruby/runtime/builtin/IRubyObject;
{noformat}

Will fix.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to