Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.7.0.pre2
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
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:
def z yield end
and it is called:
@y.z {|(a, b)| [a, b]}
where @y is an instance with the z method. In MRI, this returns [nil, nil]. In jruby, it throws a Java exception.
Appears to be working fine now. Marking as fixed in pre2.