-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
add invokelatest from Julia 0.6 #352
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1471,6 +1471,13 @@ else | |
using Base: StringVector | ||
end | ||
|
||
# https://github.com/JuliaLang/julia/pull/19784 | ||
if isdefined(Base, :invokelatest) | ||
import Base.invokelatest | ||
else | ||
invokelatest(f, args...) = eval(Expr(:call, f, map(QuoteNode, args)...)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this surely is the correct definition for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @martinholters, that's not true. Prior to that PR, you might get some random obsolete version of a function. See, for example JuliaLang/julia#7884 ... we had to add something like this in IJulia long before 17057. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know. But I use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The point is, this seems to be about the simplest correct definition of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for the misunderstanding: I didn't want to propose replacing what you have done, merely suggest to consider the simplified definition in addition. But admittedly, it doesn't really fit into Compat and I have no API proposal, so let's forget about it. |
||
end | ||
|
||
# https://github.com/JuliaLang/julia/pull/21257 | ||
if v"0.5.0-rc1+46" <= VERSION < v"0.6.0-pre.beta.28" | ||
collect(A) = collect_indices(indices(A), A) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"works on Julia 0.4+" (or "in"?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, fixed.