JuliaLang/julia — pull request #699 by carlobaldassi (2012-04-11 03:51:10+00:00)
Title: Bitarray update

Here is a bunch of updates for bitarrays:

* more efficient code for `reverse` and `vcat`
* fixed `reshape` behaviour to match that of Arrays rather than that of AbstractArrays (i.e. the data is shared between the result and the origin, rather than being copied)
* added a generalized `copy_to` with positions and number of elements to copy, just like the one for Arrays
* general code polish
* adopted the changes in behaviour from commit 0cd86dcda00a7a41c55952677de43ad6a466527f

About the last point: as you can see, I had to modify `show.jl`. This is because when calling `show(::BitVector)`, given the choice between `show(::AbstractArray)` and `show{T}(::AbstractVector{T})`, Julia was invoking the former, even though `BitVector` is `<: AbstractVector{Int}`. I guess that's a bug?
Also, I haven't found a way to force `invoke` to use the parametrized version. (The modification I did should be harmless though.)