Yielding no values to a block gives ArrayIndexOutOfBoundsException
------------------------------------------------------------------

                 Key: JRUBY-6124
                 URL: https://jira.codehaus.org/browse/JRUBY-6124
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.7
            Reporter: Martin Harriman
            Assignee: Thomas E Enebo


Yielding no values to a block with |(a, b)| throws 
Java::JavaLang::ArrayIndexOutOfBoundsException.

This is tested in rubyspec/language/block_spec:

Assume there's a method z:

{noformat}
def z
  yield
end
{noformat}

and it is called:

{noformat}
  @y.z {|(a, b)| [a, b]}
{noformat}

where @y is an instance with the z method. In MRI, this returns [nil, nil]. In 
jruby, it throws a Java exception.

--
This message is automatically generated by JIRA.
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