with method fix

This commit is contained in:
Thomas Breloff 2015-10-30 12:47:48 -04:00
parent 809ed02b85
commit cca263fb2b

View File

@ -248,14 +248,14 @@ function with(f::Function, args...; kw...)
end end
end end
display(olddefs) # display(olddefs)
display(newdefs) # display(newdefs)
# now set all those defaults # now set all those defaults
default(; newdefs...) default(; newdefs...)
# call the function # call the function
f() ret = f()
# put the defaults back # put the defaults back
default(; olddefs...) default(; olddefs...)
@ -265,7 +265,8 @@ function with(f::Function, args...; kw...)
backend(oldbackend) backend(oldbackend)
end end
return # return the result of the function
ret
end end
# --------------------------------------------------------------- # ---------------------------------------------------------------