Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! fixup! Excise Random from the system image
Browse files Browse the repository at this point in the history
vchuravy committed Oct 8, 2023
1 parent ec8c2d4 commit 070ef3f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions base/stubs.jl
Original file line number Diff line number Diff line change
@@ -13,17 +13,18 @@ module Random
end
end

function Base.rand(args...)
import Base: rand, randn
function rand(args...)
Base.invoke_in_world(delay_initialize(), rand, args...)
end

function Base.randn(args...)
Base.invoke_in_world(delay_initialize(), rand, args...)
function randn(args...)
Base.invoke_in_world(delay_initialize(), randn, args...)
end
end

function delete_stubs(mod)
for name in names(mod)
for name in names(mod, imported=true)
if name == :delay_initialize
continue
end

0 comments on commit 070ef3f

Please sign in to comment.