Skip to content

Commit

Permalink
make a[] == a[1], since in all other cases missing trailing indexes a…
Browse files Browse the repository at this point in the history
…re 1
  • Loading branch information
JeffBezanson committed Oct 18, 2012
1 parent ede7707 commit 8f82ffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ end

## Indexing: ref ##

ref{T}(a::Array{T,0}) = arrayref(a,1)
ref(a::Array) = arrayref(a,1)

ref(A::Array, i0::Integer) = arrayref(A,int(i0))
ref(A::Array, i0::Integer, i1::Integer) = arrayref(A,int(i0),int(i1))
Expand Down

0 comments on commit 8f82ffd

Please sign in to comment.