From cc664066b063e85a9c9c5b56d5d2611101e77b02 Mon Sep 17 00:00:00 2001 From: Kenta Sato Date: Mon, 2 Aug 2021 17:30:24 +0900 Subject: [PATCH] guard `isempty (close #41656) (#41752) (cherry picked from commit 4c3829d413a12c2b4a87952e0f6d1ecbbff63239) --- contrib/generate_precompile.jl | 2 +- test/misc.jl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/generate_precompile.jl b/contrib/generate_precompile.jl index 06166a9726930..28be1a992efda 100644 --- a/contrib/generate_precompile.jl +++ b/contrib/generate_precompile.jl @@ -1,6 +1,6 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license -if isempty(Base.ARGS) || Base.ARGS[1] !== "0" +if Base.isempty(Base.ARGS) || Base.ARGS[1] !== "0" Sys.__init_build() # Prevent this from being put into the Main namespace @eval Module() begin diff --git a/test/misc.jl b/test/misc.jl index e069267ae3bed..30369830cf04b 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -912,3 +912,6 @@ end @testset "issue #28188" begin @test `$(@__FILE__)` == let file = @__FILE__; `$file` end end + +# issue #41656 +@test success(`$(Base.julia_cmd()) -e 'isempty(x) = true'`)