Skip to content

Don't call on.exit() inside defer() calls in local_seed() - #287

Merged
lionel- merged 2 commits into
r-lib:mainfrom
BjarkeHautop:main
May 19, 2026
Merged

lionel- merged 2 commits into
r-lib:mainfrom
BjarkeHautop:main

Conversation

@BjarkeHautop

@BjarkeHautop BjarkeHautop commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

This removes the on.exit() calls inside defer() in local_seed(), which made the .Random.seed not be restored correctly.

Fixes #286

@BjarkeHautop BjarkeHautop changed the title Add test from #286 Don't use on.exit() inside defer() May 18, 2026
@BjarkeHautop BjarkeHautop changed the title Don't use on.exit() inside defer() Don't call on.exit() inside defer() calls in local_seed() May 18, 2026
@lionel-
lionel- merged commit ed0f82e into r-lib:main May 19, 2026
13 checks passed
@lionel-

lionel- commented May 19, 2026

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with local_seed?

2 participants