Skip to content

Commit

Permalink
corrections to history function (fixes #706)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored Aug 16, 2018
1 parent 9ebc928 commit 81d98a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/IJulia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,17 @@ clear_history

#######################################################################
# methods to print history or any subset thereof
function history(io::IO, indices::AbstractVector{Int})
function history(io::IO, indices::AbstractVector{<:Integer})
for n in intersect(indices, 1:IJulia.n)
if haskey(In, n)
print(In[n])
print(io, In[n])
end
end
end

history(io::IO, x::Union{Integer,AbstractVector{Int}}...) = history(io, vcat(x...))
history(io::IO, x::Union{Integer,AbstractVector{<:Integer}}...) = history(io, vcat(x...))
history(x...) = history(stdout, x...)
history(io::IO, x...) = throw(MethodError(history, (x...,)))
history(io::IO, x...) = throw(MethodError(history, (io, x...,)))
history() = history(1:n)
"""
history([io], [indices...])
Expand Down

0 comments on commit 81d98a3

Please sign in to comment.