diff --git a/base/error.jl b/base/error.jl index 2e6e48af165ac..41abb719f12f8 100644 --- a/base/error.jl +++ b/base/error.jl @@ -202,7 +202,7 @@ julia> @assert isodd(3) "What even are numbers?" ``` """ macro assert(ex, msgs...) - @isdefined(isdebug) && !(isdebug()) && return nothing + isdefined(@__MODULE__, :isdebug) && !(isdebug()) && return nothing msg = isempty(msgs) ? ex : msgs[1] if isa(msg, AbstractString) msg = msg # pass-through