Skip to content

Commit e2d5a3d

Browse files
authored
bugfix: use provided pseudorandom generator
1 parent f41b86b commit e2d5a3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/Random/src/misc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function shuffle(rng::AbstractRNG, tup::(Tuple{Vararg{T, N}} where {T})) where {
188188
@inline let # `@inline` and `@inbounds` are here to help escape analysis
189189
clo = @inbounds let mem = Memory{UInt16}(undef, N) # use `UInt16` to save stack space/prevent heap allocation
190190
copyto!(mem, Base.OneTo(N))
191-
shuffle!(mem)
191+
shuffle!(rng, mem)
192192
let mem = mem, tup = tup
193193
function closure(i::Int)
194194
@inbounds tup[mem[i]]

0 commit comments

Comments
 (0)