Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of invoke #461

Merged
merged 1 commit into from
Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/IJulia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ end

# since a range could be huge, intersect it with 1:n first
clear_history{T<:Integer}(r::Range{T}) =
invoke(clear_history, (Any,), intersect(r, 1:n))
invoke(clear_history, Tuple{Any}, intersect(r, 1:n))

function clear_history()
empty!(In)
Expand Down
5 changes: 2 additions & 3 deletions src/execute_request.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ function execute_request(socket, msg)
undisplay(result) # dequeue if needed, since we display result in pyout
display() # flush pending display requests

if result != nothing
if result !== nothing
# Work around for Julia issue #265 (see # #7884 for context)
# We have to explicitly invoke the correct metadata method.
result_metadata = invoke(metadata, (typeof(result),), result)
result_metadata = eval(:(metadata($(QuoteNode(result)))))
send_ipython(publish[],
msg_pub(msg, "execute_result",
Dict("execution_count" => n,
Expand Down
4 changes: 2 additions & 2 deletions src/stdio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function readline(io::StdioPipe)
end
end
else
invoke(readline, (supertype(StdioPipe),), io)
invoke(readline, Tuple{supertype(StdioPipe)}, io)
end
end

Expand Down Expand Up @@ -181,7 +181,7 @@ end

import Base.flush
function flush(io::StdioPipe)
invoke(flush, (supertype(StdioPipe),), io)
invoke(flush, Tuple{supertype(StdioPipe)}, io)
if io == STDOUT
oslibuv_flush()
send_stream("stdout")
Expand Down