Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setDT() on a get()-returned object no longer works as intended #6725

Closed
MichaelChirico opened this issue Jan 16, 2025 · 0 comments · Fixed by #6726
Closed

setDT() on a get()-returned object no longer works as intended #6725

MichaelChirico opened this issue Jan 16, 2025 · 0 comments · Fixed by #6726
Milestone

Comments

@MichaelChirico
Copy link
Member

MichaelChirico commented Jan 16, 2025

This is a pretty minimal reprex of a regression that might solve #6575 and was extracted from the tests in {DTwrappers}:

https://github.com/cran/DTwrappers/blob/e730e04e9164aa333339955375d6c225f7609fcc/tests/testthat/test-dtwrappers.R#L11-L17

x = data.frame(a = 1)
e = environment()
foo = function() {
  setDT(get('x', envir=e))
}
foo()

is.data.table(x)
## 1.16.4
# [1] TRUE

## current master
# [1] FALSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant