Skip to content

Commit

Permalink
fix bug for getindex(::Number, ::Real)
Browse files Browse the repository at this point in the history
(cherry picked from commit b718cbc)
  • Loading branch information
jakebolewski authored and ivarne committed Oct 27, 2014
1 parent 3816e88 commit 3ad21b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/number.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ endof(x::Number) = 1
getindex(x::Number) = x
getindex(x::Number, i::Integer) = i == 1 ? x : throw(BoundsError())
getindex(x::Number, I::Integer...) = all([i == 1 for i in I]) ? x : throw(BoundsError())
getindex(x::Number, I::Real...) = getindex(x, to_index(i)...)
getindex(x::Number, I::Real...) = getindex(x, to_index(I)...)
first(x::Number) = x
last(x::Number) = x

Expand Down

0 comments on commit 3ad21b0

Please sign in to comment.