Foreach over empty array #211

merged 2 commits into from Nov 12, 2011


None yet

2 participants


The foreach method on array called the sub when the array is empty.

zaphod42 added some commits Nov 11, 2011
@zaphod42 zaphod42 Test for foreach over empty array
There is a bug in which a the autoboxed foreach over an emtpy array
still calls the supplied sub once with undef.
@zaphod42 zaphod42 Fixed foreach method
The foreach method called at least once in all cases, which is
wrong when the array is empty.
@schwern schwern merged commit c101c41 into evalEmpire:master Nov 12, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment