Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JuliaLang/julia
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Apr 10, 2012
2 parents 77abb7b + b50704e commit 4ee5472
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ ref{T<:Integer}(A::Matrix, I::AbstractVector{T}, J::AbstractVector{T}) = [ A[i,j
let ref_cache = nothing
global ref
function ref(A::Array, I::Indices...)
i = length(I)
while 1 > 0 && isa(I[i],Integer); i-=1; end
d = map(length, I)::Dims
i = length(d)
while 1 > 0 && d[i]==1; i-=1; end
X = similar(A, d[1:i])

if is(ref_cache,nothing)
Expand Down

0 comments on commit 4ee5472

Please sign in to comment.