JRuby's instance_exec only accepts up to 3 arguments
----------------------------------------------------

                 Key: JRUBY-3594
                 URL: http://jira.codehaus.org/browse/JRUBY-3594
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.2
            Reporter: Charles Oliver Nutter
            Assignee: Thomas E Enebo
            Priority: Critical
             Fix For: JRuby 1.3


This breaks some specs the rspec guys are running, but shouldn't affect most 
specs (since matchers almost never have more than three arguments:

http://gist.github.com/99209

The problem is that our instance_exec is specified as follows, forcing it to 
have no more than 3 arguments:

{noformat}
    @JRubyMethod(name = "instance_exec", optional = 3, rest = true, frame = 
true)
    public IRubyObject instance_exec(ThreadContext context, IRubyObject[] args, 
Block block) {
{noformat}

The fix is trivial; delete the optional = 3. Also add a spec for instance_exec 
somewhere (as a rubyspec and as a test in JRuby since we don't run 1.8.7 specs 
yet), and add an error to the invocation handle generator to disallow both 
optional and rest in an annotation *OR* fix it to just treat it as rest.

-- 
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