diff --git a/base/errorshow.jl b/base/errorshow.jl index 1e03996e410ea..641cf5f2cdf4b 100644 --- a/base/errorshow.jl +++ b/base/errorshow.jl @@ -222,7 +222,7 @@ function showerror(io::IO, ex::MethodError) arg_types = (is_arg_types ? ex.args : typesof(ex.args...))::DataType f = ex.f meth = methods_including_ambiguous(f, arg_types) - if length(meth) > 1 + if isa(meth, MethodList) && length(meth) > 1 return showerror_ambiguous(io, meth, f, arg_types) end arg_types_param::SimpleVector = arg_types.parameters @@ -898,4 +898,3 @@ function show(io::IO, ::MIME"text/plain", stack::ExceptionStack) show_exception_stack(io, stack) end show(io::IO, stack::ExceptionStack) = show(io, MIME("text/plain"), stack) - diff --git a/base/process.jl b/base/process.jl index 89ea68a9444c9..b3ec79fa1ab4e 100644 --- a/base/process.jl +++ b/base/process.jl @@ -84,15 +84,16 @@ const SpawnIOs = Vector{Any} # convenience name for readability for io in stdio] handle = Libc.malloc(_sizeof_uv_process) disassociate_julia_struct(handle) # ensure that data field is set to C_NULL + (; exec, flags, env, dir) = cmd err = ccall(:jl_spawn, Int32, (Cstring, Ptr{Cstring}, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Tuple{Cint, UInt}}, Int, UInt32, Ptr{Cstring}, Cstring, Ptr{Cvoid}), - file, cmd.exec, loop, handle, + file, exec, loop, handle, iohandles, length(iohandles), - cmd.flags, - cmd.env === nothing ? C_NULL : cmd.env, - isempty(cmd.dir) ? C_NULL : cmd.dir, + flags, + env === nothing ? C_NULL : env, + isempty(dir) ? C_NULL : dir, @cfunction(uv_return_spawn, Cvoid, (Ptr{Cvoid}, Int64, Int32))) if err != 0 ccall(:jl_forceclose_uv, Cvoid, (Ptr{Cvoid},), handle) # will call free on handle eventually diff --git a/base/toml_parser.jl b/base/toml_parser.jl index 8fcfc4ca0c29c..4b2af426429a0 100644 --- a/base/toml_parser.jl +++ b/base/toml_parser.jl @@ -323,7 +323,7 @@ function Base.showerror(io::IO, err::ParserError) # In this case we want the arrow to point one character pos = err.pos::Int err.type == ErrUnexpectedEofExpectedValue && (pos += 1) - str1, err1 = point_to_line(err.str, pos, pos, io) + str1, err1 = point_to_line(err.str::String, pos, pos, io) @static if VERSION <= v"1.6.0-DEV.121" # See https://github.com/JuliaLang/julia/issues/36015 format_fixer = get(io, :color, false) == true ? "\e[0m" : ""