Foreach over empty array #211

Merged
merged 2 commits into from Nov 12, 2011

Projects

None yet

2 participants

@zaphod42

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.
13d13b3
@zaphod42 zaphod42 Fixed foreach method
The foreach method called at least once in all cases, which is
wrong when the array is empty.
82f1a8a
@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