(maint) Properly handle non-parallel enumerables
For Enumerables containing 0 or 1 items, the #each_in_parallel method was improperly calling the block without an argument, then calling it again properly but not returning the result of the block. The #each method returns the Enumerable that was it was called on, rather than the value of the block. This needs to be #map instead, to actually return an array of the one or zero values. The tests weren't catching this because they were effectively passing `identity` as the block, nullifying the distinction between #each and #map.
Showing
Please register or sign in to comment