Skip to content

Commit 8ebe564

Browse files
timholyKristofferC
authored andcommitted
Add missing seed!(::_GLOBAL_RNG) method (#32961)
1 parent 583fa6c commit 8ebe564

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

stdlib/Random/src/RNGs.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ copy(::_GLOBAL_RNG) = copy(default_rng())
320320
seed!(::_GLOBAL_RNG, seed::Vector{UInt32}) = seed!(default_rng(), seed)
321321
seed!(::_GLOBAL_RNG, n::Integer) = seed!(default_rng(), n)
322322
seed!(::_GLOBAL_RNG, ::Nothing) = seed!(default_rng(), nothing)
323+
seed!(::_GLOBAL_RNG) = seed!(default_rng(), nothing)
323324

324325
rng_native_52(::_GLOBAL_RNG) = rng_native_52(default_rng())
325326
rand(::_GLOBAL_RNG, sp::SamplerBoolBitInteger) = rand(default_rng(), sp)

stdlib/Random/test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ end
722722
@test Random.seed!(GLOBAL_RNG, nothing) === LOCAL_RNG
723723
@test Random.seed!(GLOBAL_RNG, UInt32[0]) === LOCAL_RNG
724724
@test Random.seed!(GLOBAL_RNG, 0) === LOCAL_RNG
725+
@test Random.seed!(GLOBAL_RNG) === LOCAL_RNG
725726

726727
mt = MersenneTwister(1)
727728
@test copy!(mt, GLOBAL_RNG) === mt

0 commit comments

Comments
 (0)