JuliaLang/julia — pull request #7548 by tanmaykm (2014-07-09 11:42:25+00:00)
Title: fix searchsorted for sorted segments of arrays

This fixes `searchsorted` to work properly on sorted segments of overall unsorted arrays.

Without this patch:

````
julia> searchsorted(ones(15), 1, 6, 10, Base.Order.Forward)
5:11

julia> searchsorted([1:5, 1:5, 1:5], 1, 6, 10, Base.Order.Forward)
5:6
````

With this patch:

````
julia> searchsorted(ones(15), 1, 6, 10, Base.Order.Forward)
6:10

julia> searchsorted([1:5, 1:5, 1:5], 1, 6, 10, Base.Order.Forward)
6:6
````